hashicorp/packer-plugin-ansible

Ansible-remote Extra Vars

开放

#20 创建于 2021年4月16日

 (0 条评论) (0 个反应) (0 位负责人)Go (39 个派生)auto 404
enhancementgood first issueprovisioner/ansible-remote

仓库指标

星标
 (64 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

This issue was originally opened by @gamethis as hashicorp/packer#9300. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.

Feature Description

add variable for ansible extra vars to payload.

A written overview of the feature. add option in payload for ansible_extra_vars This would be to seperate and simplify form.

Use Case(s)

today you have to do something like this

  "extra_arguments": ["-vv",
                "-T 1200",
                "--extra-vars",
                "ansible_host_key_checking=False ansible_scp_if_ssh=True ansible_python_interpreter=/usr/bin/python3.6 ansible_ssh_retries=20 ansible_ssh_common_args='-C -o ControlMaster=auto -o ControlPersist=180s -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' ansible_shell_type=powershell ansible_user={{user `ssh_username`}} ansible_password={{user `ssh_password`}} ansible_become_method=runas ansible_become_user=System proxy_addr=thd-svr-proxy.homedepot.com:9090 proxy_bypass=retail.net ansible_shell_executable=None"

            ],

the idea would be to allow the extra vars to be seperated to make for a clearer payload

"extra_arguments": ["-vv",
                "-T 1200",
            ],
            "ansible_extra_vars":[
                "ansible_host_key_checking=False",
                "ansible_scp_if_ssh=True"
                "ansible_python_interpreter=/usr/bin/python3.6"
            ]

贡献者指南