Hello,

I am trying to build an AMI on AWS EC2 using the ansible provisioner.
Unfortunately the provision step breaks due to an undefined option passed 
to ansible.

The error I get during the run is:
[...]
==> amazon-ebs: Executing Ansible: run-ansible-playbook.sh --extra-vars 
packer_build_name=amazon-ebs packer_builder_type=amazon-ebs -o 
IdentitiesOnly=yes -i /tmp/packer-provisioner-ansible639718942 
/.../playbooks/bootstrap.yaml -e 
ansible_ssh_private_key_file=/tmp/ansible-key290956539 -vv
    amazon-ebs: Running: pipenv run ansible-playbook --extra-vars 
packer_build_name=amazon-ebs packer_builder_type=amazon-ebs -o 
IdentitiesOnly=yes -i /tmp/packer-provisioner-ansible639718942 
/.../playbooks/bootstrap.yaml -e 
ansible_ssh_private_key_file=/tmp/ansible-key290956539 -vv
    amazon-ebs: Loading .env environment variables…
    amazon-ebs: Usage: ansible-playbook [options] playbook.yml [playbook2 
...]
    amazon-ebs:
    amazon-ebs: ansible-playbook: error: no such option: -o
[...]


Ansible version:
$ pipenv run ansible-playbook --version
Loading .env environment variables…
ansible-playbook 2.7.10
  config file = /.../ansible.cfg
  configured module search path = [u'/.../modules']
  ansible python module location = 
/.../.local/share/virtualenvs/operations-Xz-KgfLF/local/lib/python2.7/site-packages/ansible
  executable location = 
/.../.local/share/virtualenvs/operations-Xz-KgfLF/bin/ansible-playbook
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 
20160609]

Packer version:
$ packer version
Packer v1.4.0

Running ansible-playbook without -o works. Testing the entire cli command 
has proven very hard because I was not able to retain the inventory for 
further debugging (even with --debug).

As I was not able to find any reference to the -o option in the ansible 
reference (since ansible 2.5, the oldest doc available on 
https://docs.ansible.com/), is ansible 2.x expected to work with the packer 
ansible provisioner?

If it should, any idea how may I overcome or fix this issue?

Thank you for your time and help,
Edoardo

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/ee91585e-d2c7-4a12-abc6-3772e2f81bf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to