Skip to content

Instantly share code, notes, and snippets.

@ppennanen
Created April 17, 2018 09:11
Show Gist options
  • Save ppennanen/77e64f55fa1d7218e10ecd8b1ae1f2e8 to your computer and use it in GitHub Desktop.
Save ppennanen/77e64f55fa1d7218e10ecd8b1ae1f2e8 to your computer and use it in GitHub Desktop.
Packer LXD builder and ansible-local provisioner extra_arguments do not work
2018/04/17 11:07:02 [INFO] Packer version: 1.2.2
2018/04/17 11:07:02 Packer Target OS/Arch: linux amd64
2018/04/17 11:07:02 Built with Go Version: go1.10
2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 Using internal plugin for amazon-chroot
2018/04/17 11:07:02 Using internal plugin for hyperv-iso
2018/04/17 11:07:02 Using internal plugin for qemu
2018/04/17 11:07:02 Using internal plugin for googlecompute
2018/04/17 11:07:02 Using internal plugin for lxc
2018/04/17 11:07:02 Using internal plugin for ncloud
2018/04/17 11:07:02 Using internal plugin for oracle-classic
2018/04/17 11:07:02 Using internal plugin for virtualbox-iso
2018/04/17 11:07:02 Using internal plugin for vmware-iso
2018/04/17 11:07:02 Using internal plugin for cloudstack
2018/04/17 11:07:02 Using internal plugin for docker
2018/04/17 11:07:02 Using internal plugin for lxd
2018/04/17 11:07:02 Using internal plugin for oneandone
2018/04/17 11:07:02 Using internal plugin for openstack
2018/04/17 11:07:02 Using internal plugin for parallels-pvm
2018/04/17 11:07:02 Using internal plugin for amazon-ebsvolume
2018/04/17 11:07:02 Using internal plugin for azure-arm
2018/04/17 11:07:02 Using internal plugin for null
2018/04/17 11:07:02 Using internal plugin for virtualbox-ovf
2018/04/17 11:07:02 Using internal plugin for amazon-instance
2018/04/17 11:07:02 Using internal plugin for file
2018/04/17 11:07:02 Using internal plugin for hyperv-vmcx
2018/04/17 11:07:02 Using internal plugin for vmware-vmx
2018/04/17 11:07:02 Using internal plugin for scaleway
2018/04/17 11:07:02 Using internal plugin for alicloud-ecs
2018/04/17 11:07:02 Using internal plugin for amazon-ebssurrogate
2018/04/17 11:07:02 Using internal plugin for digitalocean
2018/04/17 11:07:02 Using internal plugin for oracle-oci
2018/04/17 11:07:02 Using internal plugin for parallels-iso
2018/04/17 11:07:02 Using internal plugin for profitbricks
2018/04/17 11:07:02 Using internal plugin for triton
2018/04/17 11:07:02 Using internal plugin for amazon-ebs
2018/04/17 11:07:02 Using internal plugin for ansible-local
2018/04/17 11:07:02 Using internal plugin for puppet-masterless
2018/04/17 11:07:02 Using internal plugin for puppet-server
2018/04/17 11:07:02 Using internal plugin for shell
2018/04/17 11:07:02 Using internal plugin for ansible
2018/04/17 11:07:02 Using internal plugin for chef-client
2018/04/17 11:07:02 Using internal plugin for powershell
2018/04/17 11:07:02 Using internal plugin for windows-shell
2018/04/17 11:07:02 Using internal plugin for shell-local
2018/04/17 11:07:02 Using internal plugin for windows-restart
2018/04/17 11:07:02 Using internal plugin for chef-solo
2018/04/17 11:07:02 Using internal plugin for converge
2018/04/17 11:07:02 Using internal plugin for file
2018/04/17 11:07:02 Using internal plugin for salt-masterless
2018/04/17 11:07:02 Using internal plugin for alicloud-import
2018/04/17 11:07:02 Using internal plugin for atlas
2018/04/17 11:07:02 Using internal plugin for checksum
2018/04/17 11:07:02 Using internal plugin for googlecompute-export
2018/04/17 11:07:02 Using internal plugin for vagrant-cloud
2018/04/17 11:07:02 Using internal plugin for docker-push
2018/04/17 11:07:02 Using internal plugin for docker-save
2018/04/17 11:07:02 Using internal plugin for docker-tag
2018/04/17 11:07:02 Using internal plugin for amazon-import
2018/04/17 11:07:02 Using internal plugin for compress
2018/04/17 11:07:02 Using internal plugin for docker-import
2018/04/17 11:07:02 Using internal plugin for manifest
2018/04/17 11:07:02 Using internal plugin for shell-local
2018/04/17 11:07:02 Using internal plugin for vsphere-template
2018/04/17 11:07:02 Using internal plugin for artifice
2018/04/17 11:07:02 Using internal plugin for vagrant
2018/04/17 11:07:02 Using internal plugin for vsphere
2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 Attempting to open config file: /home/petpen1/.packerconfig
2018/04/17 11:07:02 [WARN] Config file doesn't exist: /home/petpen1/.packerconfig
2018/04/17 11:07:02 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[vmware-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso lxd:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file oracle-classic:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic openstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack amazon-ebsvolume:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume azure-arm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm null:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null hyperv-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso alicloud-ecs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs amazon-ebs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs oneandone:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone virtualbox-ovf:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf digitalocean:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean oracle-oci:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci parallels-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso profitbricks:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks amazon-chroot:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot googlecompute:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute cloudstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack triton:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton qemu:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu lxc:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc parallels-pvm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm hyperv-vmcx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx scaleway:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway amazon-ebssurrogate:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate virtualbox-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso docker:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker amazon-instance:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance ncloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud vmware-vmx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx] PostProcessors:map[atlas:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-atlas compress:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress docker-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import artifice:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice checksum:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum googlecompute-export:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export vagrant:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant alicloud-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import docker-push:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push docker-save:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save manifest:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local vsphere:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere vagrant-cloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud docker-tag:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag amazon-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import vsphere-template:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template] Provisioners:map[shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file salt-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless chef-client:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client windows-shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell windows-restart:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart chef-solo:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo ansible-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local puppet-server:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell converge:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge puppet-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless ansible:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible powershell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell]}
2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 Setting cache directory: /home/petpen1/ansible_local_test/packer_cache
2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 Loading builder: lxd
2018/04/17 11:07:02 Plugin could not be found. Checking same directory as executable.
2018/04/17 11:07:02 Current exe path: /usr/local/bin/packer
2018/04/17 11:07:02 Creating plugin client for path: /usr/local/bin/packer
2018/04/17 11:07:02 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-lxd"}
2018/04/17 11:07:02 Waiting for RPC address for: /usr/local/bin/packer
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 [INFO] Packer version: 1.2.2
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Packer Target OS/Arch: linux amd64
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Built with Go Version: go1.10
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Attempting to open config file: /home/petpen1/.packerconfig
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 [WARN] Config file doesn't exist: /home/petpen1/.packerconfig
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Setting cache directory: /home/petpen1/ansible_local_test/packer_cache
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 args: []string{"packer-builder-lxd"}
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin minimum port: 10000
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin maximum port: 25000
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin address: unix /tmp/packer-plugin079467242
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Waiting for connection...
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Serving a plugin connection...
2018/04/17 11:07:02 Loading provisioner: shell
2018/04/17 11:07:02 Plugin could not be found. Checking same directory as executable.
2018/04/17 11:07:02 Current exe path: /usr/local/bin/packer
2018/04/17 11:07:02 Creating plugin client for path: /usr/local/bin/packer
2018/04/17 11:07:02 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell"}
2018/04/17 11:07:02 Waiting for RPC address for: /usr/local/bin/packer
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 [INFO] Packer version: 1.2.2
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Packer Target OS/Arch: linux amd64
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Built with Go Version: go1.10
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Attempting to open config file: /home/petpen1/.packerconfig
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 [WARN] Config file doesn't exist: /home/petpen1/.packerconfig
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Setting cache directory: /home/petpen1/ansible_local_test/packer_cache
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 args: []string{"packer-provisioner-shell"}
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin minimum port: 10000
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin maximum port: 25000
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin address: unix /tmp/packer-plugin973570364
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Waiting for connection...
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Serving a plugin connection...
2018/04/17 11:07:02 Loading provisioner: ansible-local
2018/04/17 11:07:02 Plugin could not be found. Checking same directory as executable.
2018/04/17 11:07:02 Current exe path: /usr/local/bin/packer
2018/04/17 11:07:02 Creating plugin client for path: /usr/local/bin/packer
2018/04/17 11:07:02 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-ansible-local"}
2018/04/17 11:07:02 Waiting for RPC address for: /usr/local/bin/packer
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 [INFO] Packer version: 1.2.2
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Packer Target OS/Arch: linux amd64
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Built with Go Version: go1.10
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Attempting to open config file: /home/petpen1/.packerconfig
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 [WARN] Config file doesn't exist: /home/petpen1/.packerconfig
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Setting cache directory: /home/petpen1/ansible_local_test/packer_cache
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 args: []string{"packer-provisioner-ansible-local"}
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin minimum port: 10000
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin maximum port: 25000
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Detected home directory from env var: /home/petpen1
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Plugin address: unix /tmp/packer-plugin298711832
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Waiting for connection...
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Serving a plugin connection...
2018/04/17 11:07:02 ui: test-image output will be in this color.
2018/04/17 11:07:02 ui:
2018/04/17 11:07:02 Build debug mode: false
2018/04/17 11:07:02 Force build: false
2018/04/17 11:07:02 On error:
2018/04/17 11:07:02 Preparing build: test-image
2018/04/17 11:07:02 Waiting on builds to complete...
2018/04/17 11:07:02 Starting build run: test-image
2018/04/17 11:07:02 Running builder: lxd
2018/04/17 11:07:02 [INFO] (telemetry) Starting builder lxd
2018/04/17 11:07:02 ui: ==> test-image: Creating container...
2018/04/17 11:07:02 packer: 2018/04/17 11:07:02 Executing lxc command: []string{"launch", "--ephemeral=false", "--profile=default", "centos-7-20180417", "packer-test-image"}
2018/04/17 11:07:05 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=0ffe43ad-f7af-0436-15c8-2085567ad085&version=1.2.2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2018/04/17 11:07:05 packer: 2018/04/17 11:07:05 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=0ffe43ad-f7af-0436-15c8-2085567ad085&version=1.2.2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2018/04/17 11:07:05 packer: 2018/04/17 11:07:05 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=0ffe43ad-f7af-0436-15c8-2085567ad085&version=1.2.2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2018/04/17 11:07:05 packer: 2018/04/17 11:07:05 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=0ffe43ad-f7af-0436-15c8-2085567ad085&version=1.2.2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2018/04/17 11:07:09 packer: 2018/04/17 11:07:09 stdout: Creating packer-test-image
Starting packer-test-image:
2018/04/17 11:07:09 packer: 2018/04/17 11:07:09 stderr:
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Sleeping for 3 seconds...
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Running the provision hook
2018/04/17 11:07:12 [INFO] (telemetry) Starting provisioner shell
2018/04/17 11:07:12 ui: ==> test-image: Provisioning with shell script: /tmp/packer-shell782588779
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Opening /tmp/packer-shell782588779 for reading
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 [INFO] 36 bytes written for 'uploadData'
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Executing with lxc exec in container: packer-test-image test -d "/tmp/script_819.sh"
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"test -d \"/tmp/script_819.sh\"\""}
2018/04/17 11:07:12 [INFO] 36 bytes written for 'uploadData'
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 lxc exec execution exited with '1': 'test -d "/tmp/script_819.sh"'
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Running copy command: lxc file push - packer-test-image/tmp/script_819.sh
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Executing with lxc exec in container: packer-test-image chmod 0755 /tmp/script_819.sh
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"chmod 0755 /tmp/script_819.sh\""}
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 lxc exec execution exited with '0': 'chmod 0755 /tmp/script_819.sh'
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:12 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:12 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Executing with lxc exec in container: packer-test-image chmod +x /tmp/script_819.sh; PACKER_BUILDER_TYPE='lxd' PACKER_BUILD_NAME='test-image' http_proxy='http://192.168.4.151:3128' /tmp/script_819.sh
2018/04/17 11:07:12 packer: 2018/04/17 11:07:12 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"chmod +x /tmp/script_819.sh; PACKER_BUILDER_TYPE='lxd' PACKER_BUILD_NAME='test-image' http_proxy='http://192.168.4.151:3128' /tmp/script_819.sh\""}
2018/04/17 11:07:12 ui: test-image: Failed to set locale, defaulting to C
2018/04/17 11:07:12 ui: test-image: Loaded plugins: fastestmirror
2018/04/17 11:07:15 ui: test-image: http://se.mirror.guru/centos/7.4.1708/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
2018/04/17 11:07:15 ui: test-image: Trying other mirror.
2018/04/17 11:07:15 ui: test-image: To address this issue please refer to the below wiki article
2018/04/17 11:07:15 ui: test-image:
2018/04/17 11:07:15 ui: test-image: https://wiki.centos.org/yum-errors
2018/04/17 11:07:15 ui: test-image:
2018/04/17 11:07:15 ui: test-image: If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
2018/04/17 11:07:15 ui: test-image:
2018/04/17 11:07:15 ui: test-image: http://mirrors.glesys.net/CentOS/7.4.1708/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
2018/04/17 11:07:15 ui: test-image: Trying other mirror.
2018/04/17 11:07:15 ui: test-image: http://mirror.hh.se/centos/7.4.1708/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 14] HTTP Error 403 - Forbidden
2018/04/17 11:07:15 ui: test-image: Trying other mirror.
2018/04/17 11:07:16 ui: test-image: Determining fastest mirrors
2018/04/17 11:07:22 ui: test-image: * base: centos.uib.no
2018/04/17 11:07:22 ui: test-image: * extras: centos.mirror.far.fi
2018/04/17 11:07:22 ui: test-image: * updates: centos.mirror.far.fi
2018/04/17 11:07:26 ui: test-image: Resolving Dependencies
2018/04/17 11:07:26 ui: test-image: --> Running transaction check
2018/04/17 11:07:26 ui: test-image: ---> Package ansible.noarch 0:2.4.2.0-2.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: sshpass for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python2-jmespath for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-six for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-setuptools for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-passlib for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-paramiko for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-jinja2 for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-httplib2 for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-cryptography for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: PyYAML for package: ansible-2.4.2.0-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Running transaction check
2018/04/17 11:07:26 ui: test-image: ---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-11.el7.x86_64
2018/04/17 11:07:26 ui: test-image: ---> Package python-httplib2.noarch 0:0.9.2-1.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-jinja2.noarch 0:2.7.2-2.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-2.el7.noarch
2018/04/17 11:07:26 ui: test-image: ---> Package python-paramiko.noarch 0:2.1.1-4.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python2-pyasn1 for package: python-paramiko-2.1.1-4.el7.noarch
2018/04/17 11:07:26 ui: test-image: ---> Package python-passlib.noarch 0:1.6.5-2.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-setuptools.noarch 0:0.9.8-7.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-7.el7.noarch
2018/04/17 11:07:26 ui: test-image: ---> Package python-six.noarch 0:1.9.0-2.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python2-cryptography.x86_64 0:1.7.2-1.el7_4.1 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-idna >= 2.0 for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-cffi >= 1.4.1 for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-ipaddress for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-enum34 for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: openssl for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
2018/04/17 11:07:26 ui: test-image: ---> Package python2-jmespath.noarch 0:0.9.0-3.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package sshpass.x86_64 0:1.06-2.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Running transaction check
2018/04/17 11:07:26 ui: test-image: ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package openssl.x86_64 1:1.0.2k-8.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: make for package: 1:openssl-1.0.2k-8.el7.x86_64
2018/04/17 11:07:26 ui: test-image: ---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch
2018/04/17 11:07:26 ui: test-image: ---> Package python-cffi.x86_64 0:1.6.0-5.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-pycparser for package: python-cffi-1.6.0-5.el7.x86_64
2018/04/17 11:07:26 ui: test-image: ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-idna.noarch 0:2.4-1.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-ipaddress.noarch 0:1.0.16-2.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python2-pyasn1.noarch 0:0.1.9-7.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Running transaction check
2018/04/17 11:07:26 ui: test-image: ---> Package make.x86_64 1:3.82-23.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
2018/04/17 11:07:26 ui: test-image: ---> Package python-pycparser.noarch 0:2.14-1.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Processing Dependency: python-ply for package: python-pycparser-2.14-1.el7.noarch
2018/04/17 11:07:26 ui: test-image: --> Running transaction check
2018/04/17 11:07:26 ui: test-image: ---> Package python-ply.noarch 0:3.4-11.el7 will be installed
2018/04/17 11:07:26 ui: test-image: --> Finished Dependency Resolution
2018/04/17 11:07:26 ui: test-image:
2018/04/17 11:07:26 ui: test-image: Dependencies Resolved
2018/04/17 11:07:26 ui: test-image:
2018/04/17 11:07:26 ui: test-image: ================================================================================
2018/04/17 11:07:26 ui: test-image: Package Arch Version Repository
2018/04/17 11:07:26 ui: test-image: Size
2018/04/17 11:07:26 ui: test-image: ================================================================================
2018/04/17 11:07:26 ui: test-image: Installing:
2018/04/17 11:07:26 ui: test-image: ansible noarch 2.4.2.0-2.el7 extras 7.6 M
2018/04/17 11:07:26 ui: test-image: Installing for dependencies:
2018/04/17 11:07:26 ui: test-image: PyYAML x86_64 3.10-11.el7 base 153 k
2018/04/17 11:07:26 ui: test-image: libyaml x86_64 0.1.4-11.el7_0 base 55 k
2018/04/17 11:07:26 ui: test-image: make x86_64 1:3.82-23.el7 base 420 k
2018/04/17 11:07:26 ui: test-image: openssl x86_64 1:1.0.2k-8.el7 base 492 k
2018/04/17 11:07:26 ui: test-image: python-babel noarch 0.9.6-8.el7 base 1.4 M
2018/04/17 11:07:26 ui: test-image: python-backports x86_64 1.0-8.el7 base 5.8 k
2018/04/17 11:07:26 ui: test-image: python-backports-ssl_match_hostname noarch 3.4.0.2-4.el7 base 12 k
2018/04/17 11:07:26 ui: test-image: python-cffi x86_64 1.6.0-5.el7 base 218 k
2018/04/17 11:07:26 ui: test-image: python-enum34 noarch 1.0.4-1.el7 base 52 k
2018/04/17 11:07:26 ui: test-image: python-httplib2 noarch 0.9.2-1.el7 extras 115 k
2018/04/17 11:07:26 ui: test-image: python-idna noarch 2.4-1.el7 base 94 k
2018/04/17 11:07:26 ui: test-image: python-ipaddress noarch 1.0.16-2.el7 base 34 k
2018/04/17 11:07:26 ui: test-image: python-jinja2 noarch 2.7.2-2.el7 base 515 k
2018/04/17 11:07:26 ui: test-image: python-markupsafe x86_64 0.11-10.el7 base 25 k
2018/04/17 11:07:26 ui: test-image: python-paramiko noarch 2.1.1-4.el7 extras 268 k
2018/04/17 11:07:26 ui: test-image: python-passlib noarch 1.6.5-2.el7 extras 488 k
2018/04/17 11:07:26 ui: test-image: python-ply noarch 3.4-11.el7 base 123 k
2018/04/17 11:07:26 ui: test-image: python-pycparser noarch 2.14-1.el7 base 104 k
2018/04/17 11:07:26 ui: test-image: python-setuptools noarch 0.9.8-7.el7 base 397 k
2018/04/17 11:07:26 ui: test-image: python-six noarch 1.9.0-2.el7 base 29 k
2018/04/17 11:07:26 ui: test-image: python2-cryptography x86_64 1.7.2-1.el7_4.1 updates 502 k
2018/04/17 11:07:26 ui: test-image: python2-jmespath noarch 0.9.0-3.el7 extras 39 k
2018/04/17 11:07:26 ui: test-image: python2-pyasn1 noarch 0.1.9-7.el7 base 100 k
2018/04/17 11:07:26 ui: test-image: sshpass x86_64 1.06-2.el7 extras 21 k
2018/04/17 11:07:26 ui: test-image:
2018/04/17 11:07:26 ui: test-image: Transaction Summary
2018/04/17 11:07:26 ui: test-image: ================================================================================
2018/04/17 11:07:26 ui: test-image: Install 1 Package (+24 Dependent packages)
2018/04/17 11:07:26 ui: test-image:
2018/04/17 11:07:26 ui: test-image: Total download size: 13 M
2018/04/17 11:07:26 ui: test-image: Installed size: 62 M
2018/04/17 11:07:26 ui: test-image: Downloading packages:
2018/04/17 11:07:26 ui: test-image: warning: /var/cache/yum/x86_64/7/base/packages/libyaml-0.1.4-11.el7_0.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
2018/04/17 11:07:26 ui: test-image: Public key for libyaml-0.1.4-11.el7_0.x86_64.rpm is not installed
2018/04/17 11:07:27 ui: test-image: Public key for python-httplib2-0.9.2-1.el7.noarch.rpm is not installed
2018/04/17 11:07:27 ui: test-image: Public key for python2-cryptography-1.7.2-1.el7_4.1.x86_64.rpm is not installed
2018/04/17 11:07:27 ui: test-image: --------------------------------------------------------------------------------
2018/04/17 11:07:27 ui: test-image: Total 17 MB/s | 13 MB 00:00
2018/04/17 11:07:27 ui: test-image: Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
2018/04/17 11:07:27 ui: test-image: Importing GPG key 0xF4A80EB5:
2018/04/17 11:07:27 ui: test-image: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
2018/04/17 11:07:27 ui: test-image: Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
2018/04/17 11:07:27 ui: test-image: Package : centos-release-7-4.1708.el7.centos.x86_64 (@base)
2018/04/17 11:07:27 ui: test-image: From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
2018/04/17 11:07:27 ui: test-image: Running transaction check
2018/04/17 11:07:27 ui: test-image: Running transaction test
2018/04/17 11:07:27 ui: test-image: Transaction test succeeded
2018/04/17 11:07:27 ui: test-image: Running transaction
2018/04/17 11:07:27 ui: test-image: Installing : python2-pyasn1-0.1.9-7.el7.noarch 1/25
2018/04/17 11:07:27 ui: test-image: Installing : python-six-1.9.0-2.el7.noarch 2/25
2018/04/17 11:07:27 ui: test-image: Installing : python-httplib2-0.9.2-1.el7.noarch 3/25
2018/04/17 11:07:27 ui: test-image: Installing : python-enum34-1.0.4-1.el7.noarch 4/25
2018/04/17 11:07:27 ui: test-image: Installing : python-ipaddress-1.0.16-2.el7.noarch 5/25
2018/04/17 11:07:28 ui: test-image: Installing : libyaml-0.1.4-11.el7_0.x86_64 6/25
2018/04/17 11:07:28 ui: test-image: Installing : PyYAML-3.10-11.el7.x86_64 7/25
2018/04/17 11:07:29 ui: test-image: Installing : 1:make-3.82-23.el7.x86_64 8/25
2018/04/17 11:07:29 ui: test-image: Installing : 1:openssl-1.0.2k-8.el7.x86_64 9/25
2018/04/17 11:07:29 ui: test-image: Installing : python-backports-1.0-8.el7.x86_64 10/25
2018/04/17 11:07:29 ui: test-image: Installing : python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch 11/25
2018/04/17 11:07:29 ui: test-image: Installing : python-setuptools-0.9.8-7.el7.noarch 12/25
2018/04/17 11:07:29 ui: test-image: Installing : python-babel-0.9.6-8.el7.noarch 13/25
2018/04/17 11:07:29 ui: test-image: Installing : python-passlib-1.6.5-2.el7.noarch 14/25
2018/04/17 11:07:29 ui: test-image: Installing : python-ply-3.4-11.el7.noarch 15/25
2018/04/17 11:07:29 ui: test-image: Installing : python-pycparser-2.14-1.el7.noarch 16/25
2018/04/17 11:07:29 ui: test-image: Installing : python-cffi-1.6.0-5.el7.x86_64 17/25
2018/04/17 11:07:30 ui: test-image: Installing : python-markupsafe-0.11-10.el7.x86_64 18/25
2018/04/17 11:07:30 ui: test-image: Installing : python-jinja2-2.7.2-2.el7.noarch 19/25
2018/04/17 11:07:30 ui: test-image: Installing : python-idna-2.4-1.el7.noarch 20/25
2018/04/17 11:07:30 ui: test-image: Installing : python2-cryptography-1.7.2-1.el7_4.1.x86_64 21/25
2018/04/17 11:07:30 ui: test-image: Installing : python-paramiko-2.1.1-4.el7.noarch 22/25
2018/04/17 11:07:30 ui: test-image: Installing : python2-jmespath-0.9.0-3.el7.noarch 23/25
2018/04/17 11:07:33 ui: test-image: Installing : sshpass-1.06-2.el7.x86_64 24/25
2018/04/17 11:07:33 ui: test-image: Installing : ansible-2.4.2.0-2.el7.noarch 25/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-jinja2-2.7.2-2.el7.noarch 1/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch 2/25
2018/04/17 11:07:33 ui: test-image: Verifying : sshpass-1.06-2.el7.x86_64 3/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-setuptools-0.9.8-7.el7.noarch 4/25
2018/04/17 11:07:33 ui: test-image: Verifying : python2-cryptography-1.7.2-1.el7_4.1.x86_64 5/25
2018/04/17 11:07:33 ui: test-image: Verifying : 1:openssl-1.0.2k-8.el7.x86_64 6/25
2018/04/17 11:07:33 ui: test-image: Verifying : python2-jmespath-0.9.0-3.el7.noarch 7/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-six-1.9.0-2.el7.noarch 8/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-idna-2.4-1.el7.noarch 9/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-markupsafe-0.11-10.el7.x86_64 10/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-ply-3.4-11.el7.noarch 11/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-passlib-1.6.5-2.el7.noarch 12/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-babel-0.9.6-8.el7.noarch 13/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-paramiko-2.1.1-4.el7.noarch 14/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-backports-1.0-8.el7.x86_64 15/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-cffi-1.6.0-5.el7.x86_64 16/25
2018/04/17 11:07:33 ui: test-image: Verifying : 1:make-3.82-23.el7.x86_64 17/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-pycparser-2.14-1.el7.noarch 18/25
2018/04/17 11:07:33 ui: test-image: Verifying : libyaml-0.1.4-11.el7_0.x86_64 19/25
2018/04/17 11:07:33 ui: test-image: Verifying : ansible-2.4.2.0-2.el7.noarch 20/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-ipaddress-1.0.16-2.el7.noarch 21/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-enum34-1.0.4-1.el7.noarch 22/25
2018/04/17 11:07:33 ui: test-image: Verifying : python-httplib2-0.9.2-1.el7.noarch 23/25
2018/04/17 11:07:33 ui: test-image: Verifying : python2-pyasn1-0.1.9-7.el7.noarch 24/25
2018/04/17 11:07:33 ui: test-image: Verifying : PyYAML-3.10-11.el7.x86_64 25/25
2018/04/17 11:07:33 ui: test-image:
2018/04/17 11:07:33 ui: test-image: Installed:
2018/04/17 11:07:33 ui: test-image: ansible.noarch 0:2.4.2.0-2.el7
2018/04/17 11:07:33 ui: test-image:
2018/04/17 11:07:33 ui: test-image: Dependency Installed:
2018/04/17 11:07:33 ui: test-image: PyYAML.x86_64 0:3.10-11.el7
2018/04/17 11:07:33 ui: test-image: libyaml.x86_64 0:0.1.4-11.el7_0
2018/04/17 11:07:33 ui: test-image: make.x86_64 1:3.82-23.el7
2018/04/17 11:07:33 ui: test-image: openssl.x86_64 1:1.0.2k-8.el7
2018/04/17 11:07:33 ui: test-image: python-babel.noarch 0:0.9.6-8.el7
2018/04/17 11:07:33 ui: test-image: python-backports.x86_64 0:1.0-8.el7
2018/04/17 11:07:33 ui: test-image: python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7
2018/04/17 11:07:33 ui: test-image: python-cffi.x86_64 0:1.6.0-5.el7
2018/04/17 11:07:33 ui: test-image: python-enum34.noarch 0:1.0.4-1.el7
2018/04/17 11:07:33 ui: test-image: python-httplib2.noarch 0:0.9.2-1.el7
2018/04/17 11:07:33 ui: test-image: python-idna.noarch 0:2.4-1.el7
2018/04/17 11:07:33 ui: test-image: python-ipaddress.noarch 0:1.0.16-2.el7
2018/04/17 11:07:33 ui: test-image: python-jinja2.noarch 0:2.7.2-2.el7
2018/04/17 11:07:33 ui: test-image: python-markupsafe.x86_64 0:0.11-10.el7
2018/04/17 11:07:33 ui: test-image: python-paramiko.noarch 0:2.1.1-4.el7
2018/04/17 11:07:33 ui: test-image: python-passlib.noarch 0:1.6.5-2.el7
2018/04/17 11:07:33 ui: test-image: python-ply.noarch 0:3.4-11.el7
2018/04/17 11:07:33 ui: test-image: python-pycparser.noarch 0:2.14-1.el7
2018/04/17 11:07:33 ui: test-image: python-setuptools.noarch 0:0.9.8-7.el7
2018/04/17 11:07:33 ui: test-image: python-six.noarch 0:1.9.0-2.el7
2018/04/17 11:07:33 ui: test-image: python2-cryptography.x86_64 0:1.7.2-1.el7_4.1
2018/04/17 11:07:33 ui: test-image: python2-jmespath.noarch 0:0.9.0-3.el7
2018/04/17 11:07:33 ui: test-image: python2-pyasn1.noarch 0:0.1.9-7.el7
2018/04/17 11:07:33 ui: test-image: sshpass.x86_64 0:1.06-2.el7
2018/04/17 11:07:33 ui: test-image:
2018/04/17 11:07:33 ui: test-image: Complete!
2018/04/17 11:07:33 packer: 2018/04/17 11:07:33 lxc exec execution exited with '0': 'chmod +x /tmp/script_819.sh; PACKER_BUILDER_TYPE='lxd' PACKER_BUILD_NAME='test-image' http_proxy='http://192.168.4.151:3128' /tmp/script_819.sh'
2018/04/17 11:07:33 packer: 2018/04/17 11:07:33 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:33 [INFO] 13447 bytes written for 'stdout'
2018/04/17 11:07:33 [INFO] 1120 bytes written for 'stderr'
2018/04/17 11:07:33 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:33 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:33 packer: 2018/04/17 11:07:33 [INFO] 13447 bytes written for 'stdout'
2018/04/17 11:07:33 packer: 2018/04/17 11:07:33 [INFO] 1120 bytes written for 'stderr'
2018/04/17 11:07:33 packer: 2018/04/17 11:07:33 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:33 packer: 2018/04/17 11:07:33 Executing with lxc exec in container: packer-test-image rm -f /tmp/script_819.sh
2018/04/17 11:07:33 packer: 2018/04/17 11:07:33 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"rm -f /tmp/script_819.sh\""}
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 lxc exec execution exited with '0': 'rm -f /tmp/script_819.sh'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:34 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:34 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:34 [INFO] (telemetry) ending shell
2018/04/17 11:07:34 [INFO] (telemetry) Starting provisioner ansible-local
2018/04/17 11:07:34 ui: ==> test-image: Provisioning with Ansible...
2018/04/17 11:07:34 ui: test-image: Creating Ansible staging directory...
2018/04/17 11:07:34 ui: test-image: Creating directory: /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing with lxc exec in container: packer-test-image mkdir -p '/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"mkdir -p '/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d'\""}
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 lxc exec execution exited with '0': 'mkdir -p '/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d''
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:34 [INFO] 0 bytes written for 'stdout'
2018/04/17 11:07:34 [INFO] 0 bytes written for 'stderr'
2018/04/17 11:07:34 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:34 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] 0 bytes written for 'stdout'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] 0 bytes written for 'stderr'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:34 ui: test-image: Uploading main Playbook file...
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] 290 bytes written for 'uploadData'
2018/04/17 11:07:34 [INFO] 290 bytes written for 'uploadData'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing with lxc exec in container: packer-test-image test -d "/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml"
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"test -d \"/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml\"\""}
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 lxc exec execution exited with '1': 'test -d "/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml"'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Running copy command: lxc file push - packer-test-image/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml
2018/04/17 11:07:34 ui: test-image: Uploading inventory file...
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 [INFO] 9 bytes written for 'uploadData'
2018/04/17 11:07:34 [INFO] 9 bytes written for 'uploadData'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing with lxc exec in container: packer-test-image test -d "/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519"
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"test -d \"/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519\"\""}
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 lxc exec execution exited with '1': 'test -d "/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519"'
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Running copy command: lxc file push - packer-test-image/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519
2018/04/17 11:07:34 ui: test-image: Executing Ansible: cd /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml --extra-vars "packer_build_name=test-image packer_builder_type=lxd packer_http_addr=" --extra-vars="test_variable=cli-test" -vvv -c local -i /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing with lxc exec in container: packer-test-image cd /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml --extra-vars "packer_build_name=test-image packer_builder_type=lxd packer_http_addr=" --extra-vars="test_variable=cli-test" -vvv -c local -i /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519
2018/04/17 11:07:34 packer: 2018/04/17 11:07:34 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"cd /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml --extra-vars \"packer_build_name=test-image packer_builder_type=lxd packer_http_addr=\" --extra-vars=\"test_variable=cli-test\" -vvv -c local -i /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519\""}
2018/04/17 11:07:35 ui: test-image: [WARNING]: Could not match supplied host pattern, ignoring: all
2018/04/17 11:07:35 ui: test-image:
2018/04/17 11:07:35 ui: test-image: [WARNING]: provided hosts list is empty, only localhost is available
2018/04/17 11:07:35 ui: test-image:
2018/04/17 11:07:35 ui: test-image:
2018/04/17 11:07:35 ui: test-image: PLAY [localhost] ***************************************************************
2018/04/17 11:07:35 ui: test-image:
2018/04/17 11:07:35 ui: test-image: TASK [Gathering Facts] *********************************************************
2018/04/17 11:07:41 ui: test-image: ok: [localhost]
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 ui: test-image: TASK [debug] *******************************************************************
2018/04/17 11:07:41 ui: test-image: ok: [localhost] => {
2018/04/17 11:07:41 ui: test-image: "packer_build_name": "test-image"
2018/04/17 11:07:41 ui: test-image: }
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 ui: test-image: TASK [debug] *******************************************************************
2018/04/17 11:07:41 ui: test-image: ok: [localhost] => {
2018/04/17 11:07:41 ui: test-image: "packer_builder_type": "VARIABLE IS NOT DEFINED!"
2018/04/17 11:07:41 ui: test-image: }
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 ui: test-image: TASK [debug] *******************************************************************
2018/04/17 11:07:41 ui: test-image: ok: [localhost] => {
2018/04/17 11:07:41 ui: test-image: "packer_http_addr": "VARIABLE IS NOT DEFINED!"
2018/04/17 11:07:41 ui: test-image: }
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 ui: test-image: TASK [debug] *******************************************************************
2018/04/17 11:07:41 ui: test-image: ok: [localhost] => {
2018/04/17 11:07:41 ui: test-image: "msg": "play_hosts=[]"
2018/04/17 11:07:41 ui: test-image: }
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 ui: test-image: TASK [debug] *******************************************************************
2018/04/17 11:07:41 ui: test-image: ok: [localhost] => {
2018/04/17 11:07:41 ui: test-image: "inventory_hostname": "localhost"
2018/04/17 11:07:41 ui: test-image: }
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 ui: test-image: TASK [debug] *******************************************************************
2018/04/17 11:07:41 ui: test-image: ok: [localhost] => {
2018/04/17 11:07:41 ui: test-image: "test_variable": "VARIABLE IS NOT DEFINED!"
2018/04/17 11:07:41 ui: test-image: }
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 ui: test-image: PLAY RECAP *********************************************************************
2018/04/17 11:07:41 ui: test-image: localhost : ok=7 changed=0 unreachable=0 failed=0
2018/04/17 11:07:41 ui: test-image:
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 lxc exec execution exited with '0': 'cd /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/playbook.yml --extra-vars "packer_build_name=test-image packer_builder_type=lxd packer_http_addr=" --extra-vars="test_variable=cli-test" -vvv -c local -i /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d/packer-provisioner-ansible-local055642519'
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:41 [INFO] 1459 bytes written for 'stdout'
2018/04/17 11:07:41 [INFO] 181 bytes written for 'stderr'
2018/04/17 11:07:41 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:41 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] 1459 bytes written for 'stdout'
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] 181 bytes written for 'stderr'
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:41 ui: test-image: Removing staging directory...
2018/04/17 11:07:41 ui: test-image: Removing directory: /tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 Executing with lxc exec in container: packer-test-image rm -rf '/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d'
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 Executing lxc exec: /bin/sh []string{"/bin/sh", "-c", "lxc exec packer-test-image -- /bin/sh -c \"rm -rf '/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d'\""}
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 lxc exec execution exited with '0': 'rm -rf '/tmp/packer-provisioner-ansible-local/5ad5b936-5ae3-b1a0-d42a-d0ec24b1d10d''
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:41 [INFO] 0 bytes written for 'stdout'
2018/04/17 11:07:41 [INFO] 0 bytes written for 'stderr'
2018/04/17 11:07:41 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:41 [INFO] RPC endpoint: Communicator ended with: 0
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] 0 bytes written for 'stdout'
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] 0 bytes written for 'stderr'
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 [INFO] RPC client: Communicator ended with: 0
2018/04/17 11:07:41 [INFO] (telemetry) ending ansible-local
2018/04/17 11:07:41 ui: ==> test-image: Stopping container...
2018/04/17 11:07:41 packer: 2018/04/17 11:07:41 Executing lxc command: []string{"stop", "packer-test-image"}
2018/04/17 11:07:42 packer: 2018/04/17 11:07:42 stdout:
2018/04/17 11:07:42 packer: 2018/04/17 11:07:42 stderr:
2018/04/17 11:07:42 ui: ==> test-image: Publishing container...
2018/04/17 11:07:42 packer: 2018/04/17 11:07:42 Executing lxc command: []string{"publish", "packer-test-image", "--alias", "test-image-20180417", "description=Ansible-local test image."}
2018/04/17 11:08:29 packer: 2018/04/17 11:08:29 stdout: Container published with fingerprint: 6409dfb9b777fa670647f7b9165acca1b088635d452342b66436c93c63183d1f
2018/04/17 11:08:29 packer: 2018/04/17 11:08:29 stderr:
2018/04/17 11:08:29 ui: ==> test-image: Created image: 6409dfb9b777fa670647f7b9165acca1b088635d452342b66436c93c63183d1f
2018/04/17 11:08:29 ui: ==> test-image: Unregistering and deleting deleting container...
2018/04/17 11:08:29 packer: 2018/04/17 11:08:29 Executing lxc command: []string{"delete", "--force", "packer-test-image"}
2018/04/17 11:08:31 packer: 2018/04/17 11:08:31 stdout:
2018/04/17 11:08:31 packer: 2018/04/17 11:08:31 stderr:
2018/04/17 11:08:31 [INFO] (telemetry) ending lxd
2018/04/17 11:08:31 ui: Build 'test-image' finished.
2018/04/17 11:08:31 Builds completed. Waiting on interrupt barrier...
2018/04/17 11:08:31 ui:
==> Builds finished. The artifacts of successful builds are:
2018/04/17 11:08:31 machine readable: test-image,artifact-count []string{"1"}
2018/04/17 11:08:31 machine readable: test-image,artifact []string{"0", "builder-id", "lxd"}
2018/04/17 11:08:31 machine readable: test-image,artifact []string{"0", "id", "6409dfb9b777fa670647f7b9165acca1b088635d452342b66436c93c63183d1f"}
2018/04/17 11:08:31 machine readable: test-image,artifact []string{"0", "string", "image: 6409dfb9b777fa670647f7b9165acca1b088635d452342b66436c93c63183d1f"}
2018/04/17 11:08:31 machine readable: test-image,artifact []string{"0", "files-count", "0"}
2018/04/17 11:08:31 machine readable: test-image,artifact []string{"0", "end"}
2018/04/17 11:08:31 ui: --> test-image: image: 6409dfb9b777fa670647f7b9165acca1b088635d452342b66436c93c63183d1f
2018/04/17 11:08:31 [INFO] (telemetry) Finalizing.
2018/04/17 11:08:33 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post https://checkpoint-api.hashicorp.com/v1/telemetry/packer: context deadline exceeded
2018/04/17 11:08:33 waiting for all plugin processes to complete...
2018/04/17 11:08:33 /usr/local/bin/packer: plugin process exited
2018/04/17 11:08:33 /usr/local/bin/packer: plugin process exited
2018/04/17 11:08:33 /usr/local/bin/packer: plugin process exited
test-image output will be in this color.
==> test-image: Creating container...
==> test-image: Provisioning with shell script: /tmp/packer-shell399837580
test-image: Failed to set locale, defaulting to C
test-image: Loaded plugins: fastestmirror
test-image: http://se.mirror.guru/centos/7.4.1708/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
test-image: Trying other mirror.
test-image: To address this issue please refer to the below wiki article
test-image:
test-image: https://wiki.centos.org/yum-errors
test-image:
test-image: If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
test-image:
test-image: http://mirrors.glesys.net/CentOS/7.4.1708/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
test-image: Trying other mirror.
test-image: http://mirror.hh.se/centos/7.4.1708/os/x86_64/repodata/0c34273ad0292747ee5e15c047d3e51c67ca59861a446972db45d71abacc7ad7-primary.sqlite.bz2: [Errno 14] HTTP Error 403 - Forbidden
test-image: Trying other mirror.
test-image: Determining fastest mirrors
test-image: * base: centos.uib.no
test-image: * extras: centos.mirror.far.fi
test-image: * updates: centos.mirror.far.fi
test-image: Resolving Dependencies
test-image: --> Running transaction check
test-image: ---> Package ansible.noarch 0:2.4.2.0-2.el7 will be installed
test-image: --> Processing Dependency: sshpass for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python2-jmespath for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python-six for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python-setuptools for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python-passlib for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python-paramiko for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python-jinja2 for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python-httplib2 for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: python-cryptography for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Processing Dependency: PyYAML for package: ansible-2.4.2.0-2.el7.noarch
test-image: --> Running transaction check
test-image: ---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed
test-image: --> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-11.el7.x86_64
test-image: ---> Package python-httplib2.noarch 0:0.9.2-1.el7 will be installed
test-image: ---> Package python-jinja2.noarch 0:2.7.2-2.el7 will be installed
test-image: --> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-2.el7.noarch
test-image: --> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-2.el7.noarch
test-image: ---> Package python-paramiko.noarch 0:2.1.1-4.el7 will be installed
test-image: --> Processing Dependency: python2-pyasn1 for package: python-paramiko-2.1.1-4.el7.noarch
test-image: ---> Package python-passlib.noarch 0:1.6.5-2.el7 will be installed
test-image: ---> Package python-setuptools.noarch 0:0.9.8-7.el7 will be installed
test-image: --> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-7.el7.noarch
test-image: ---> Package python-six.noarch 0:1.9.0-2.el7 will be installed
test-image: ---> Package python2-cryptography.x86_64 0:1.7.2-1.el7_4.1 will be installed
test-image: --> Processing Dependency: python-idna >= 2.0 for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
test-image: --> Processing Dependency: python-cffi >= 1.4.1 for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
test-image: --> Processing Dependency: python-ipaddress for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
test-image: --> Processing Dependency: python-enum34 for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
test-image: --> Processing Dependency: openssl for package: python2-cryptography-1.7.2-1.el7_4.1.x86_64
test-image: ---> Package python2-jmespath.noarch 0:0.9.0-3.el7 will be installed
test-image: ---> Package sshpass.x86_64 0:1.06-2.el7 will be installed
test-image: --> Running transaction check
test-image: ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
test-image: ---> Package openssl.x86_64 1:1.0.2k-8.el7 will be installed
test-image: --> Processing Dependency: make for package: 1:openssl-1.0.2k-8.el7.x86_64
test-image: ---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed
test-image: ---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7 will be installed
test-image: --> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch
test-image: ---> Package python-cffi.x86_64 0:1.6.0-5.el7 will be installed
test-image: --> Processing Dependency: python-pycparser for package: python-cffi-1.6.0-5.el7.x86_64
test-image: ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
test-image: ---> Package python-idna.noarch 0:2.4-1.el7 will be installed
test-image: ---> Package python-ipaddress.noarch 0:1.0.16-2.el7 will be installed
test-image: ---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed
test-image: ---> Package python2-pyasn1.noarch 0:0.1.9-7.el7 will be installed
test-image: --> Running transaction check
test-image: ---> Package make.x86_64 1:3.82-23.el7 will be installed
test-image: ---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
test-image: ---> Package python-pycparser.noarch 0:2.14-1.el7 will be installed
test-image: --> Processing Dependency: python-ply for package: python-pycparser-2.14-1.el7.noarch
test-image: --> Running transaction check
test-image: ---> Package python-ply.noarch 0:3.4-11.el7 will be installed
test-image: --> Finished Dependency Resolution
test-image:
test-image: Dependencies Resolved
test-image:
test-image: ================================================================================
test-image: Package Arch Version Repository
test-image: Size
test-image: ================================================================================
test-image: Installing:
test-image: ansible noarch 2.4.2.0-2.el7 extras 7.6 M
test-image: Installing for dependencies:
test-image: PyYAML x86_64 3.10-11.el7 base 153 k
test-image: libyaml x86_64 0.1.4-11.el7_0 base 55 k
test-image: make x86_64 1:3.82-23.el7 base 420 k
test-image: openssl x86_64 1:1.0.2k-8.el7 base 492 k
test-image: python-babel noarch 0.9.6-8.el7 base 1.4 M
test-image: python-backports x86_64 1.0-8.el7 base 5.8 k
test-image: python-backports-ssl_match_hostname noarch 3.4.0.2-4.el7 base 12 k
test-image: python-cffi x86_64 1.6.0-5.el7 base 218 k
test-image: python-enum34 noarch 1.0.4-1.el7 base 52 k
test-image: python-httplib2 noarch 0.9.2-1.el7 extras 115 k
test-image: python-idna noarch 2.4-1.el7 base 94 k
test-image: python-ipaddress noarch 1.0.16-2.el7 base 34 k
test-image: python-jinja2 noarch 2.7.2-2.el7 base 515 k
test-image: python-markupsafe x86_64 0.11-10.el7 base 25 k
test-image: python-paramiko noarch 2.1.1-4.el7 extras 268 k
test-image: python-passlib noarch 1.6.5-2.el7 extras 488 k
test-image: python-ply noarch 3.4-11.el7 base 123 k
test-image: python-pycparser noarch 2.14-1.el7 base 104 k
test-image: python-setuptools noarch 0.9.8-7.el7 base 397 k
test-image: python-six noarch 1.9.0-2.el7 base 29 k
test-image: python2-cryptography x86_64 1.7.2-1.el7_4.1 updates 502 k
test-image: python2-jmespath noarch 0.9.0-3.el7 extras 39 k
test-image: python2-pyasn1 noarch 0.1.9-7.el7 base 100 k
test-image: sshpass x86_64 1.06-2.el7 extras 21 k
test-image:
test-image: Transaction Summary
test-image: ================================================================================
test-image: Install 1 Package (+24 Dependent packages)
test-image:
test-image: Total download size: 13 M
test-image: Installed size: 62 M
test-image: Downloading packages:
test-image: warning: /var/cache/yum/x86_64/7/base/packages/PyYAML-3.10-11.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
test-image: Public key for PyYAML-3.10-11.el7.x86_64.rpm is not installed
test-image: Public key for python-httplib2-0.9.2-1.el7.noarch.rpm is not installed
test-image: Public key for python2-cryptography-1.7.2-1.el7_4.1.x86_64.rpm is not installed
test-image: --------------------------------------------------------------------------------
test-image: Total 23 MB/s | 13 MB 00:00
test-image: Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
test-image: Importing GPG key 0xF4A80EB5:
test-image: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
test-image: Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
test-image: Package : centos-release-7-4.1708.el7.centos.x86_64 (@base)
test-image: From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
test-image: Running transaction check
test-image: Running transaction test
test-image: Transaction test succeeded
test-image: Running transaction
test-image: Installing : python2-pyasn1-0.1.9-7.el7.noarch 1/25
test-image: Installing : python-six-1.9.0-2.el7.noarch 2/25
test-image: Installing : python-httplib2-0.9.2-1.el7.noarch 3/25
test-image: Installing : python-enum34-1.0.4-1.el7.noarch 4/25
test-image: Installing : python-ipaddress-1.0.16-2.el7.noarch 5/25
test-image: Installing : libyaml-0.1.4-11.el7_0.x86_64 6/25
test-image: Installing : PyYAML-3.10-11.el7.x86_64 7/25
test-image: Installing : 1:make-3.82-23.el7.x86_64 8/25
test-image: Installing : 1:openssl-1.0.2k-8.el7.x86_64 9/25
test-image: Installing : python-backports-1.0-8.el7.x86_64 10/25
test-image: Installing : python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch 11/25
test-image: Installing : python-setuptools-0.9.8-7.el7.noarch 12/25
test-image: Installing : python-babel-0.9.6-8.el7.noarch 13/25
test-image: Installing : python-passlib-1.6.5-2.el7.noarch 14/25
test-image: Installing : python-ply-3.4-11.el7.noarch 15/25
test-image: Installing : python-pycparser-2.14-1.el7.noarch 16/25
test-image: Installing : python-cffi-1.6.0-5.el7.x86_64 17/25
test-image: Installing : python-markupsafe-0.11-10.el7.x86_64 18/25
test-image: Installing : python-jinja2-2.7.2-2.el7.noarch 19/25
test-image: Installing : python-idna-2.4-1.el7.noarch 20/25
test-image: Installing : python2-cryptography-1.7.2-1.el7_4.1.x86_64 21/25
test-image: Installing : python-paramiko-2.1.1-4.el7.noarch 22/25
test-image: Installing : python2-jmespath-0.9.0-3.el7.noarch 23/25
test-image: Installing : sshpass-1.06-2.el7.x86_64 24/25
test-image: Installing : ansible-2.4.2.0-2.el7.noarch 25/25
test-image: Verifying : python-jinja2-2.7.2-2.el7.noarch 1/25
test-image: Verifying : python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch 2/25
test-image: Verifying : sshpass-1.06-2.el7.x86_64 3/25
test-image: Verifying : python-setuptools-0.9.8-7.el7.noarch 4/25
test-image: Verifying : python2-cryptography-1.7.2-1.el7_4.1.x86_64 5/25
test-image: Verifying : 1:openssl-1.0.2k-8.el7.x86_64 6/25
test-image: Verifying : python2-jmespath-0.9.0-3.el7.noarch 7/25
test-image: Verifying : python-six-1.9.0-2.el7.noarch 8/25
test-image: Verifying : python-idna-2.4-1.el7.noarch 9/25
test-image: Verifying : python-markupsafe-0.11-10.el7.x86_64 10/25
test-image: Verifying : python-ply-3.4-11.el7.noarch 11/25
test-image: Verifying : python-passlib-1.6.5-2.el7.noarch 12/25
test-image: Verifying : python-babel-0.9.6-8.el7.noarch 13/25
test-image: Verifying : python-paramiko-2.1.1-4.el7.noarch 14/25
test-image: Verifying : python-backports-1.0-8.el7.x86_64 15/25
test-image: Verifying : python-cffi-1.6.0-5.el7.x86_64 16/25
test-image: Verifying : 1:make-3.82-23.el7.x86_64 17/25
test-image: Verifying : python-pycparser-2.14-1.el7.noarch 18/25
test-image: Verifying : libyaml-0.1.4-11.el7_0.x86_64 19/25
test-image: Verifying : ansible-2.4.2.0-2.el7.noarch 20/25
test-image: Verifying : python-ipaddress-1.0.16-2.el7.noarch 21/25
test-image: Verifying : python-enum34-1.0.4-1.el7.noarch 22/25
test-image: Verifying : python-httplib2-0.9.2-1.el7.noarch 23/25
test-image: Verifying : python2-pyasn1-0.1.9-7.el7.noarch 24/25
test-image: Verifying : PyYAML-3.10-11.el7.x86_64 25/25
test-image:
test-image: Installed:
test-image: ansible.noarch 0:2.4.2.0-2.el7
test-image:
test-image: Dependency Installed:
test-image: PyYAML.x86_64 0:3.10-11.el7
test-image: libyaml.x86_64 0:0.1.4-11.el7_0
test-image: make.x86_64 1:3.82-23.el7
test-image: openssl.x86_64 1:1.0.2k-8.el7
test-image: python-babel.noarch 0:0.9.6-8.el7
test-image: python-backports.x86_64 0:1.0-8.el7
test-image: python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7
test-image: python-cffi.x86_64 0:1.6.0-5.el7
test-image: python-enum34.noarch 0:1.0.4-1.el7
test-image: python-httplib2.noarch 0:0.9.2-1.el7
test-image: python-idna.noarch 0:2.4-1.el7
test-image: python-ipaddress.noarch 0:1.0.16-2.el7
test-image: python-jinja2.noarch 0:2.7.2-2.el7
test-image: python-markupsafe.x86_64 0:0.11-10.el7
test-image: python-paramiko.noarch 0:2.1.1-4.el7
test-image: python-passlib.noarch 0:1.6.5-2.el7
test-image: python-ply.noarch 0:3.4-11.el7
test-image: python-pycparser.noarch 0:2.14-1.el7
test-image: python-setuptools.noarch 0:0.9.8-7.el7
test-image: python-six.noarch 0:1.9.0-2.el7
test-image: python2-cryptography.x86_64 0:1.7.2-1.el7_4.1
test-image: python2-jmespath.noarch 0:0.9.0-3.el7
test-image: python2-pyasn1.noarch 0:0.1.9-7.el7
test-image: sshpass.x86_64 0:1.06-2.el7
test-image:
test-image: Complete!
==> test-image: Provisioning with Ansible...
test-image: Creating Ansible staging directory...
test-image: Creating directory: /tmp/packer-provisioner-ansible-local/5ad5b523-7407-ba59-c9c3-9c717f25eaa7
test-image: Uploading main Playbook file...
test-image: Uploading inventory file...
test-image: Executing Ansible: cd /tmp/packer-provisioner-ansible-local/5ad5b523-7407-ba59-c9c3-9c717f25eaa7 && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5ad5b523-7407-ba59-c9c3-9c717f25eaa7/playbook.yml --extra-vars "packer_build_name=test-image packer_builder_type=lxd packer_http_addr=" --extra-vars "test_variable=cli-test" -vvv -c local -i /tmp/packer-provisioner-ansible-local/5ad5b523-7407-ba59-c9c3-9c717f25eaa7/packer-provisioner-ansible-local031086414
test-image: [WARNING]: Could not match supplied host pattern, ignoring: all
test-image:
test-image: [WARNING]: provided hosts list is empty, only localhost is available
test-image:
test-image:
test-image: PLAY [localhost] ***************************************************************
test-image:
test-image: TASK [Gathering Facts] *********************************************************
test-image: ok: [localhost]
test-image:
test-image: TASK [debug] *******************************************************************
test-image: ok: [localhost] => {
test-image: "packer_build_name": "test-image"
test-image: }
test-image:
test-image: TASK [debug] *******************************************************************
test-image: ok: [localhost] => {
test-image: "packer_builder_type": "VARIABLE IS NOT DEFINED!"
test-image: }
test-image:
test-image: TASK [debug] *******************************************************************
test-image: ok: [localhost] => {
test-image: "packer_http_addr": "VARIABLE IS NOT DEFINED!"
test-image: }
test-image:
test-image: TASK [debug] *******************************************************************
test-image: ok: [localhost] => {
test-image: "msg": "play_hosts=[]"
test-image: }
test-image:
test-image: TASK [debug] *******************************************************************
test-image: ok: [localhost] => {
test-image: "inventory_hostname": "localhost"
test-image: }
test-image:
test-image: TASK [debug] *******************************************************************
test-image: ok: [localhost] => {
test-image: "test_variable": "VARIABLE IS NOT DEFINED!"
test-image: }
test-image:
test-image: PLAY RECAP *********************************************************************
test-image: localhost : ok=7 changed=0 unreachable=0 failed=0
test-image:
test-image: Removing staging directory...
test-image: Removing directory: /tmp/packer-provisioner-ansible-local/5ad5b523-7407-ba59-c9c3-9c717f25eaa7
==> test-image: Stopping container...
==> test-image: Publishing container...
==> test-image: Created image: d4d175b3fac9a70a7fc631a2677c822a2c7fb41cc848f1a7bc897446ecdf5099
==> test-image: Unregistering and deleting deleting container...
Build 'test-image' finished.
==> Builds finished. The artifacts of successful builds are:
--> test-image: image: d4d175b3fac9a70a7fc631a2677c822a2c7fb41cc848f1a7bc897446ecdf5099
---
- hosts: localhost
tasks:
- debug:
var: packer_build_name
- debug:
var: packer_builder_type
- debug:
var: packer_http_addr
- debug:
msg: "play_hosts={{play_hosts}}"
- debug:
var: inventory_hostname
- debug:
var: test_variable
{
"variables": {
"test_variable": "testing",
"http_proxy": "proxy.example.com"
},
"builders": [
{
"type": "lxd",
"name": "test-image",
"image": "centos-7-{{isotime \"20060102\"}}",
"output_image": "test-image-{{isotime \"20060102\"}}",
"publish_properties": {
"description": "Ansible-local test image."
}
}
],
"provisioners": [
{
"type": "shell",
"inline": "yum install -y ansible",
"environment_vars": ["http_proxy={{user `http_proxy`}}"]
},
{
"type": "ansible-local",
"clean_staging_directory": true,
"playbook_file": "playbook.yml",
"extra_arguments": [
"--extra-vars \"test_variable={{user `test_variable`}}\"",
"-vvv"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment