packer version
Host platform
CentoOS latest official AWS image (ami-337be65c)
Debug log output from PACKER_LOG=1 packer build template.json
.
Debug log:
https://gist.github.com/geertn/266e3cba10bf9c930f65a9695b26d6de
Packer json:
https://gist.github.com/geertn/3c6c71b36b951c253b8f3eb98690e620
idp-baseline.yml:
- name: Baseline
hosts: all
vars:
ansible_pipelining: yes
pre_tasks:
- fail: msg="Legacy system, exiting"
when: legacy is defined
tags: always
packer consistently fails with:
ERROR! the playbook: packer_builder_type=amazon-ebs could not be found
When SSH into the machine I can make it work by removing the escapes for extra-vars:
[centos@ip-172-31-38-55 tmp]$ cd /tmp/packer-provisioner-ansible-local/5a858d38-360a-e8de-4c07-f8f8250281d7 && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5a858d38-360a-e8de-4c07-f8f8250281d7/idp-baseline.yml --extra-vars \"packer_build_name=amazon-ebs packer_builder_type=amazon-ebs packer_http_addr=\" --extra-vars "Region=test" -c local -i /tmp/packer-provisioner-ansible-local/5a858d38-360a-e8de-4c07-f8f8250281d7/packer-provisioner-ansible-local644862448
ERROR! the playbook: packer_builder_type=amazon-ebs could not be found
Executing the following works:
[centos@ip-172-31-38-55 tmp]$ cd /tmp/packer-provisioner-ansible-local/5a858d38-360a-e8de-4c07-f8f8250281d7 && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5a858d38-360a-e8de-4c07-f8f8250281d7/idp-baseline.yml --extra-vars "packer_build_name=amazon-ebs packer_builder_type=amazon-ebs packer_http_addr=" --extra-vars "Region=test" -c local -i /tmp/packer-provisioner-ansible-local/5a858d38-360a-e8de-4c07-f8f8250281d7/packer-provisioner-ansible-local644862448
When downgrading to 1.1.3 everything works.
I think this is a duplicate of https://github.com/hashicorp/packer/issues/5885 and already fixed on master. I'm going to leave this issue open for now because it's the second duplicate we've had on this issue, probably because we closed the original one when we merged the fix -- I want people to be able to find this one and know we're already on it :) . Meanwhile, here's a linux build of the master branch which should include the fix.
packer.zip
The linked packer.zip doesn't seem to be a valid zip archive:
Archive: packer.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
I guess technically it was a tarball that I just threw a .zip extension onto so it must have given unzip
some issues. I used zip for this so hopefully it'll work.
packer.zip
Closing since we intend to release the patch tomorrow.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
I think this is a duplicate of https://github.com/hashicorp/packer/issues/5885 and already fixed on master. I'm going to leave this issue open for now because it's the second duplicate we've had on this issue, probably because we closed the original one when we merged the fix -- I want people to be able to find this one and know we're already on it :) . Meanwhile, here's a linux build of the master branch which should include the fix.
packer.zip