Container.yml :
version: ‘2’
settings:
conductor_base: alpine:3.4
services:
ansible.node-container:
roles:
- node_container
ports: - ‘3001:3001’
user: node
Command Used :
sudo ansible-container --debug build
Main.yml
Main.yml
- name: Install dumb init
get_url:
url: https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64
dest: /usr/bin/dumb-init
owner: root
group: root
mode: 0775
environment:
http_proxy: “http://xxx-proxy-out.xxx.com:8080”
https_proxy: “http://xxx-proxy-out.xxxx.com:8080”
HTTP_PROXY: “http://xxx-proxy-out.xxxx.com:8080”
HTTPS_PROXY: “http://xx-proxy-out.xxx.com:8080”
Logs:
changed = module.set_fs_attributes_if_different(file_args, False)
File “/tmp/ansible_3VUnyg/ansible_modlib.zip/ansible/module_utils/basic.py”, line 1450, in set_fs_attributes_if_different
File “/tmp/ansible_3VUnyg/ansible_modlib.zip/ansible/module_utils/basic.py”, line 1221, in set_mode_if_different
OSError: [Errno 30] Read-only file system: ‘/usr/bin/dumb-init’
fatal: [ansible.node-container]: FAILED! => {
“changed”: false,
“failed”: true,
“module_stderr”: “Traceback (most recent call last):\n File "/tmp/ansible_3VUnyg/ansible_module_get_url.py", line 573, in \n main()\n File "/tmp/ansible_3VUnyg/ansible_module_get_url.py", line 459, in main\n changed = module.set_fs_attributes_if_different(file_args, False)\n File "/tmp/ansible_3VUnyg/ansible_modlib.zip/ansible/module_utils/basic.py", line 1450, in set_fs_attributes_if_different\n File "/tmp/ansible_3VUnyg/ansible_modlib.zip/ansible/module_utils/basic.py", line 1221, in set_mode_if_different\nOSError: [Errno 30] Read-only file system: ‘/usr/bin/dumb-init’\n”,
“module_stdout”: “”,
“msg”: “MODULE FAILURE”,
“rc”: 0
}
to retry, use: --limit @/tmp/tmpegCroG/playbook.retry
PLAY RECAP *********************************************************************
ansible.node-container : ok=1 changed=0 unreachable=0 failed=1
2017-11-09T11:49:56.463302 Error applying role! [container.core] caller_file=/_ansible/container/core.py caller_func=apply_role_to_container caller_line=680 engine=<container.docker.engine.Engine object at 0x7f5611f2a710> exit_code=2 playbook=[{‘hosts’: u’ansible.node-container’, ‘roles’: [‘node_container’], ‘vars’: {}}]
2017-11-09T11:49:56.468692 Playbook run finished