My original need/question is below, but could not find any documentation to support or dissuade me from attempting it. Ive pasted a small snippet below, it does not work, and can’t find a reason through. Any breadcrumbs would be helpful and very appreciated, thank you.
Q: Can you use the override option under the Ansible provisioner to change the builder’s ssh user and password mid-build? And what would that look like?
Code Snippet:
{
“type”: “ansible”,
“playbook_file”: “playbook_foo.yml”,
“user”: “{{user service_name
}}”,
“extra_arguments”: [
“–extra-vars”,
“service_name={{user service_name
}}”,
“–extra-vars”,
“ansible_ssh_pass={{user service_pw
}}”,
“–extra-vars”,
“ansible_become_pass={{user service_pw
}}”,
“–extra-vars”,
“ansible_python_interpreter=/usr/bin/python3”
],
“override”: {
“amazon-ebs”: {“ssh_username”: “{{user service_name
}}”}
}
}