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 合併指標
 (30 天內沒有已合併 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"
            ]

貢獻者指南