Skip to content

Instantly share code, notes, and snippets.

@SwampDragons
Created June 27, 2018 20:07
Show Gist options
  • Select an option

  • Save SwampDragons/8f32b1dcaa280b9b10f9d0faaf06bb09 to your computer and use it in GitHub Desktop.

Select an option

Save SwampDragons/8f32b1dcaa280b9b10f9d0faaf06bb09 to your computer and use it in GitHub Desktop.
- hosts:
- all
become: yes
any_errors_fatal: yes
tasks:
- name: Say hi
command: "echo whoooooooo"
2018/06/27 13:07:18 ui: ==> docker: Provisioning with Ansible...
==> docker: Provisioning with Ansible...
2018/06/27 13:07:19 packer: 2018/06/27 13:07:19 SSH proxy: serving on 127.0.0.1:52127
2018/06/27 13:07:19 ui: ==> docker: Executing Ansible: ansible-playbook --extra-vars packer_build_name=docker --extra-vars packer_builder_type=docker -i /var/folders/8t/0yb5q0_x6mb2jldqq_vjn3lr0000gn/T/packer-provisioner-ansible562373077 /Users/mmarsh/dev/repro_cases/ansible/playbook_remote.yml -e ansible_ssh_private_key_file=/var/folders/8t/0yb5q0_x6mb2jldqq_vjn3lr0000gn/T/ansible-key281701070
==> docker: Executing Ansible: ansible-playbook --extra-vars packer_build_name=docker --extra-vars packer_builder_type=docker -i /var/folders/8t/0yb5q0_x6mb2jldqq_vjn3lr0000gn/T/packer-provisioner-ansible562373077 /Users/mmarsh/dev/repro_cases/ansible/playbook_remote.yml -e ansible_ssh_private_key_file=/var/folders/8t/0yb5q0_x6mb2jldqq_vjn3lr0000gn/T/ansible-key281701070
2018/06/27 13:07:19 ui: docker: Usage: ansible-playbook [options] playbook.yml [playbook2 ...]
docker: Usage: ansible-playbook [options] playbook.yml [playbook2 ...]
2018/06/27 13:07:19 ui: docker:
docker:
2018/06/27 13:07:19 ui: docker: ansible-playbook: error: no such option: --extra-vars packer_build_name
docker: ansible-playbook: error: no such option: --extra-vars packer_build_name
2018/06/27 13:07:19 packer: 2018/06/27 13:07:19 shutting down the SSH proxy
2018/06/27 13:07:19 ui: ==> docker: Killing the container: c13436eec5b2ae5803c9d09ffcc7d6ac29a59d2b69972001da7322fe6d582a86
==> docker: Killing the container: c13436eec5b2ae5803c9d09ffcc7d6ac29a59d2b69972001da7322fe6d582a86
2018/06/27 13:07:20 ui error: Build 'docker' errored: Error executing Ansible: Non-zero exit status: exit status 2
2018/06/27 13:07:20 Builds completed. Waiting on interrupt barrier...
2018/06/27 13:07:20 machine readable: error-count []string{"1"}
2018/06/27 13:07:20 ui error:
==> Some builds didn't complete successfully and had errors:
2018/06/27 13:07:20 machine readable: docker,error []string{"Error executing Ansible: Non-zero exit status: exit status 2"}
2018/06/27 13:07:20 ui error: --> docker: Error executing Ansible: Non-zero exit status: exit status 2
2018/06/27 13:07:20 ui:
==> Builds finished but no artifacts were created.
2018/06/27 13:07:20 waiting for all plugin processes to complete...
Build 'docker' errored: Error executing Ansible: Non-zero exit status: exit status 2
==> Some builds didn't complete successfully and had errors:
--> docker: Error executing Ansible: Non-zero exit status: exit status 2
==> Builds finished but no artifacts were created.
{
"builders": [
{
"type": "docker",
"image": "williamyeh/ansible:ubuntu14.04",
"export_path": "packer_bug",
"run_command": [ "-d", "-i", "-t", "--entrypoint=/bin/bash", "{{.Image}}" ]
}
],
"provisioners": [
{
"type": "ansible",
"playbook_file": "./ansible/playbook_remote.yml"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment