Project tree:
foo-app
- composer.json
- app
- file1.txt
- foo
- bar.txt
- provision
- nginx
- nginx.conf
- packer
- nginx.json
- nginx.yml
- nginx
Packer build command:
packer build provision/packer/nginx.json
{ | |
"variables": { | |
"version": "latest", | |
"ansible_host": "packer-ansible-demo", | |
"ansible_connection": "docker" | |
}, | |
"builders": [{ | |
"type": "docker", | |
"image": "nginx:1.11.10-alpine", | |
"commit": true, | |
"run_command": [ | |
"-d", "-i", "-t", "--name", "{{user `ansible_host`}}", | |
"{{.Image}}", "/bin/sh" | |
] | |
}], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"inline": [ | |
"apk --update --no-cache add python" | |
] | |
}, | |
{ | |
"type": "ansible", | |
"ansible_env_vars": [ | |
"ANSIBLE_ROLES_PATH={{user `ansible_roles_path` }}" | |
], | |
"user": "root", | |
"playbook_file": "./provision/packer/nginx.yml", | |
"extra_arguments": [ | |
"-vvvv", | |
"-e", "ansible_host={{user `ansible_host`}}", | |
"-e", "ansible_connection={{user `ansible_connection`}}" | |
] | |
} | |
], | |
"post-processors": [ | |
[ | |
{ | |
"type": "docker-tag", | |
"repository": "{{ user `ansible_host` }}", | |
"tag": "{{ user `version` }}" | |
} | |
] | |
] | |
} |
--- | |
# | |
# Ansible playbook to create base images using Packer | |
# | |
# Notes: | |
# This is designed to the run from the root of the project repo. | |
# Local paths are relative to the playbook directory. | |
# | |
# Usage: | |
# packer build provision/packer/nginx.json | |
# | |
- hosts: all | |
gather_facts: yes | |
vars: | |
# Trailing slash works: | |
deploy_path: /var/www/html/ | |
# NO trailing slash does NOT work: | |
# deploy_path: /var/www/html | |
tasks: | |
- name: Ensure the nginx configuration is installed (works) | |
template: | |
src: ../nginx/nginx.conf | |
dest: /etc/nginx/nginx.conf | |
owner: root | |
group: root | |
- name: Copy a single file to the release path (works) | |
copy: | |
src: ../../composer.json | |
dest: "{{ deploy_path }}" | |
- name: Copy multiple files to the release path (hangs indefinitely) | |
copy: | |
src: ../../app | |
dest: "{{ deploy_path }}" |
[1;32mdocker output will be in this color.[0m | |
[1;32m==> docker: Creating a temporary directory for sharing data...[0m | |
[1;32m==> docker: Pulling Docker image: nginx:1.11.10-alpine[0m | |
[0;32m docker: 1.11.10-alpine: Pulling from library/nginx[0m | |
[0;32m docker: Digest: sha256:aa0daf2b17c370a1da371a767110a43b390a9db90b90d2d1b07862dc81754d61[0m | |
[0;32m docker: Status: Image is up to date for nginx:1.11.10-alpine[0m | |
[1;32m==> docker: Starting docker container...[0m | |
[0;32m docker: Run command: docker run -v /Users/cstevens/.packer.d/tmp/packer-docker659261751:/packer-files -d -i -t --name packer-ansible-demo nginx:1.11.10-alpine /bin/sh[0m | |
[0;32m docker: Container ID: 621978f8de1fb63bc9ba2004e1ac7258b6530d57175c9f7526bc03e1cf035568[0m | |
[1;32m==> docker: Provisioning with shell script: /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/packer-shell013178910[0m | |
[0;32m docker: fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz[0m | |
[0;32m docker: fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz[0m | |
[0;32m docker: fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz[0m | |
[0;32m docker: fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz[0m | |
[0;32m docker: (1/10) Installing libbz2 (1.0.6-r5)[0m | |
[0;32m docker: (2/10) Installing expat (2.2.0-r0)[0m | |
[0;32m docker: (3/10) Installing libffi (3.2.1-r2)[0m | |
[0;32m docker: (4/10) Installing gdbm (1.11-r1)[0m | |
[0;32m docker: (5/10) Installing ncurses-terminfo-base (6.0-r7)[0m | |
[0;32m docker: (6/10) Installing ncurses-terminfo (6.0-r7)[0m | |
[0;32m docker: (7/10) Installing ncurses-libs (6.0-r7)[0m | |
[0;32m docker: (8/10) Installing readline (6.3.008-r4)[0m | |
[0;32m docker: (9/10) Installing sqlite-libs (3.13.0-r0)[0m | |
[0;32m docker: (10/10) Installing python (2.7.12-r0)[0m | |
[0;32m docker: Executing busybox-1.24.2-r13.trigger[0m | |
[0;32m docker: OK: 100 MiB in 34 packages[0m | |
[1;32m==> docker: Provisioning with Ansible...[0m | |
[0;32m docker: No config file found; using defaults[0m | |
[0;32m docker: Loading callback plugin default of type stdout, v2.0 from /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc[0m | |
[0;32m docker:[0m | |
[0;32m docker: PLAYBOOK: nginx.yml ************************************************************[0m | |
[0;32m docker: 1 plays in /Users/cstevens/Dev/packer-ansible-demo/provision/packer/nginx.yml[0m | |
[0;32m docker:[0m | |
[0;32m docker: PLAY [all] *********************************************************************[0m | |
[0;32m docker:[0m | |
[0;32m docker: TASK [setup] *******************************************************************[0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/system/setup.py[0m | |
[0;32m docker: <packer-ansible-demo> ESTABLISH DOCKER CONNECTION FOR USER: root[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488986528.96-188329250962403 `" && echo ansible-tmp-1488986528.96-188329250962403="` echo ~/.ansible/tmp/ansible-tmp-1488986528.96-188329250962403 `" ) && sleep 0\''][0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmptwxGdJ TO /root/.ansible/tmp/ansible-tmp-1488986528.96-188329250962403/setup.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986528.96-188329250962403/ /root/.ansible/tmp/ansible-tmp-1488986528.96-188329250962403/setup.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986528.96-188329250962403/setup.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1488986528.96-188329250962403/" > /dev/null 2>&1 && sleep 0\''][0m | |
[0;32m docker: ok: [default][0m | |
[0;32m docker:[0m | |
[0;32m docker: TASK [Ensure the nginx configuration is installed (works)] *********************[0m | |
[0;32m docker: task path: /Users/cstevens/Dev/packer-ansible-demo/provision/packer/nginx.yml:21[0m | |
[0;32m docker: <packer-ansible-demo> ESTABLISH DOCKER CONNECTION FOR USER: root[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327 `" && echo ansible-tmp-1488986532.88-207023179912327="` echo ~/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327 `" ) && sleep 0\''][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpi1wrMo TO /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/ /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpUIOc7y TO /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/source[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/ /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/source && sleep 0'"][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpUyp8k_ TO /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/ /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/copy.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/copy.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/ > /dev/null 2>&1 && sleep 0'"][0m | |
[0;32m docker: changed: [default] => {[0m | |
[0;32m docker: "changed": true,[0m | |
[0;32m docker: "checksum": "edcaed0c824d7f65e33c9eb2adf8c65f3ba25242",[0m | |
[0;32m docker: "dest": "/etc/nginx/nginx.conf",[0m | |
[0;32m docker: "gid": 0,[0m | |
[0;32m docker: "group": "root",[0m | |
[0;32m docker: "invocation": {[0m | |
[0;32m docker: "module_args": {[0m | |
[0;32m docker: "backup": false,[0m | |
[0;32m docker: "content": null,[0m | |
[0;32m docker: "delimiter": null,[0m | |
[0;32m docker: "dest": "/etc/nginx/nginx.conf",[0m | |
[0;32m docker: "directory_mode": null,[0m | |
[0;32m docker: "follow": true,[0m | |
[0;32m docker: "force": true,[0m | |
[0;32m docker: "group": "root",[0m | |
[0;32m docker: "mode": null,[0m | |
[0;32m docker: "original_basename": "nginx.conf",[0m | |
[0;32m docker: "owner": "root",[0m | |
[0;32m docker: "regexp": null,[0m | |
[0;32m docker: "remote_src": null,[0m | |
[0;32m docker: "selevel": null,[0m | |
[0;32m docker: "serole": null,[0m | |
[0;32m docker: "setype": null,[0m | |
[0;32m docker: "seuser": null,[0m | |
[0;32m docker: "src": "/root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/source",[0m | |
[0;32m docker: "unsafe_writes": null,[0m | |
[0;32m docker: "validate": null[0m | |
[0;32m docker: }[0m | |
[0;32m docker: },[0m | |
[0;32m docker: "md5sum": "251f55d4290d0ddbca96f5548854a665",[0m | |
[0;32m docker: "mode": "0664",[0m | |
[0;32m docker: "owner": "root",[0m | |
[0;32m docker: "size": 2916,[0m | |
[0;32m docker: "src": "/root/.ansible/tmp/ansible-tmp-1488986532.88-207023179912327/source",[0m | |
[0;32m docker: "state": "file",[0m | |
[0;32m docker: "uid": 0[0m | |
[0;32m docker: }[0m | |
[0;32m docker:[0m | |
[0;32m docker: TASK [Copy a single file to the release path (works)] **************************[0m | |
[0;32m docker: task path: /Users/cstevens/Dev/packer-ansible-demo/provision/packer/nginx.yml:28[0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> ESTABLISH DOCKER CONNECTION FOR USER: root[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488986534.62-40126083855048 `" && echo ansible-tmp-1488986534.62-40126083855048="` echo ~/.ansible/tmp/ansible-tmp-1488986534.62-40126083855048 `" ) && sleep 0\''][0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpCINPPB TO /root/.ansible/tmp/ansible-tmp-1488986534.62-40126083855048/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986534.62-40126083855048/ /root/.ansible/tmp/ansible-tmp-1488986534.62-40126083855048/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986534.62-40126083855048/stat.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1488986534.62-40126083855048/" > /dev/null 2>&1 && sleep 0\''][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437 `" && echo ansible-tmp-1488986535.28-199049501986437="` echo ~/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437 `" ) && sleep 0\''][0m | |
[0;32m docker: <packer-ansible-demo> PUT /Users/cstevens/Dev/packer-ansible-demo/composer.json TO /root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/source[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/ /root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/source && sleep 0'"][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpodvipg TO /root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/ /root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/copy.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/copy.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/" > /dev/null 2>&1 && sleep 0\''][0m | |
[0;32m docker: changed: [default] => {[0m | |
[0;32m docker: "changed": true,[0m | |
[0;32m docker: "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709",[0m | |
[0;32m docker: "dest": "/var/www/html/composer.json",[0m | |
[0;32m docker: "gid": 0,[0m | |
[0;32m docker: "group": "root",[0m | |
[0;32m docker: "invocation": {[0m | |
[0;32m docker: "module_args": {[0m | |
[0;32m docker: "backup": false,[0m | |
[0;32m docker: "content": null,[0m | |
[0;32m docker: "delimiter": null,[0m | |
[0;32m docker: "dest": "/var/www/html/composer.json",[0m | |
[0;32m docker: "directory_mode": null,[0m | |
[0;32m docker: "follow": false,[0m | |
[0;32m docker: "force": true,[0m | |
[0;32m docker: "group": null,[0m | |
[0;32m docker: "mode": null,[0m | |
[0;32m docker: "original_basename": "composer.json",[0m | |
[0;32m docker: "owner": null,[0m | |
[0;32m docker: "regexp": null,[0m | |
[0;32m docker: "remote_src": null,[0m | |
[0;32m docker: "selevel": null,[0m | |
[0;32m docker: "serole": null,[0m | |
[0;32m docker: "setype": null,[0m | |
[0;32m docker: "seuser": null,[0m | |
[0;32m docker: "src": "/root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/source",[0m | |
[0;32m docker: "unsafe_writes": null,[0m | |
[0;32m docker: "validate": null[0m | |
[0;32m docker: }[0m | |
[0;32m docker: },[0m | |
[0;32m docker: "md5sum": "d41d8cd98f00b204e9800998ecf8427e",[0m | |
[0;32m docker: "mode": "0644",[0m | |
[0;32m docker: "owner": "root",[0m | |
[0;32m docker: "size": 0,[0m | |
[0;32m docker: "src": "/root/.ansible/tmp/ansible-tmp-1488986535.28-199049501986437/source",[0m | |
[0;32m docker: "state": "file",[0m | |
[0;32m docker: "uid": 0[0m | |
[0;32m docker: }[0m | |
[0;32m docker:[0m | |
[0;32m docker: TASK [Copy multiple files to the release path (hangs indefinitely)] ************[0m | |
[0;32m docker: task path: /Users/cstevens/Dev/packer-ansible-demo/provision/packer/nginx.yml:35[0m | |
[0;32m docker: <packer-ansible-demo> ESTABLISH DOCKER CONNECTION FOR USER: root[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696 `" && echo ansible-tmp-1488986536.26-47021364981696="` echo ~/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696 `" ) && sleep 0\''][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpidl2TI TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> PUT /Users/cstevens/Dev/packer-ansible-demo/app/file1.txt TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/source[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/source && sleep 0'"][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmp2ya87k TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/copy.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/copy.py && sleep 0'"][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmp4oYrQO TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> PUT /Users/cstevens/Dev/packer-ansible-demo/app/foo/bar.txt TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/source[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/source && sleep 0'"][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpKkNQfE TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/copy.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/copy.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/copy.py && sleep 0'"][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpOegUHC TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/stat.py && sleep 0'"][0m | |
[0;32m docker: Using module file /usr/local/Cellar/ansible/2.2.1.0_1/libexec/lib/python2.7/site-packages/ansible/modules/core/files/file.py[0m | |
[0;32m docker: <packer-ansible-demo> PUT /var/folders/r4/fnw3gjwn7s77y36x6nfbgd400000gn/T/tmpwdHTnF TO /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/file.py[0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/file.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/file.py && sleep 0'"][0m | |
[0;32m docker: <packer-ansible-demo> EXEC ['/usr/local/bin/docker', 'exec', '-u', u'root', '-i', u'packer-ansible-demo', u'/bin/sh', '-c', u"/bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1488986536.26-47021364981696/ > /dev/null 2>&1 && sleep 0'"][0m | |
[0;32m docker: changed: [default] => {[0m | |
[0;32m docker: "changed": true,[0m | |
[0;32m docker: "dest": "/var/www/html/",[0m | |
[0;32m docker: "invocation": {[0m | |
[0;32m docker: "module_args": {[0m | |
[0;32m docker: "dest": "/var/www/html/",[0m | |
[0;32m docker: "src": "../../app"[0m | |
[0;32m docker: },[0m | |
[0;32m docker: "module_name": "copy"[0m | |
[0;32m docker: },[0m | |
[0;32m docker: "src": "/Users/cstevens/Dev/packer-ansible-demo/provision/packer/../../app"[0m | |
[0;32m docker: }[0m | |
[0;32m docker:[0m | |
[0;32m docker: PLAY RECAP *********************************************************************[0m | |
[0;32m docker: default : ok=4 changed=3 unreachable=0 failed=0[0m | |
[0;32m docker:[0m | |
[1;32m==> docker: Committing the container[0m | |
[0;32m docker: Image ID: sha256:310d6286606633ea7c394e9f50e34f03872e9491b617d70e3bf750262a89084b[0m | |
[1;32m==> docker: Killing the container: 621978f8de1fb63bc9ba2004e1ac7258b6530d57175c9f7526bc03e1cf035568[0m | |
[1;32m==> docker: Running post-processor: docker-tag[0m | |
[0;32m docker (docker-tag): Tagging image: sha256:310d6286606633ea7c394e9f50e34f03872e9491b617d70e3bf750262a89084b[0m | |
[0;32m docker (docker-tag): Repository: packer-ansible-demo:latest[0m | |
[1;32mBuild 'docker' finished.[0m | |
==> Builds finished. The artifacts of successful builds are: | |
--> docker: Imported Docker image: sha256:310d6286606633ea7c394e9f50e34f03872e9491b617d70e3bf750262a89084b | |
--> docker: Imported Docker image: packer-ansible-demo:latest |