Open Manigunner opened 6 years ago
Seems like there is an incompatibility between the stock centos:7
conductor image and play:8_jre_security
.
As you may already know /usr
, and in some cases /lib
, gets mounted from the conductor container to the service container. This makes it possible for an image to be built without requiring it to have a local Python runtime.
There's more info here: http://docs.ansible.com/ansible-container/conductor.html
And, you can see the details in the code here: https://github.com/ansible/ansible-container/blob/develop/container/core.py#L777
If play:8_jre_security
already has a Python runtime, you could run build
with the --use-local-python
option.
Hi @chouseknecht chouseknecht, i tried building the ansible-container using the below command Sudo ansible-container --debug build --use-local-python
Am seeing the below logs: fatal: [ansible.play_container]: FAILED! => { "changed": false, "module_stderr": "/bin/sh: /usr/bin/python: not found\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0 } to retry, use: --limit @/tmp/tmp1hijYX/playbook.retry PLAY RECAP ***** ansible.play_container : ok=0 changed=0 unreachable=0 failed=1 2017-12-01T13:41:13.544272 Error applying role! [container.core] caller_file=/_ansible/container/core.py caller_func=apply_role_to_container caller_line=699 engine=<container.docker.engine.Engine object at 0x7f2112b13e90> exit_code=2 playbook=[{'hosts': u'ansible.play_container', 'roles': ['play_container'], 'vars': {}}] 2017-12-01T13:41:13.553373 Playbook run finished. [container.core] caller_file=/_ansible/container/core.py caller_func=conductorcmd_build caller_line=831 exit_code=2
Please suggest what should be done now
Looks like the play:8_jre_security
doesn't contain a Python runtime. In order for --use-local-python
to work, the from
image in the service must have Python installed.
One suggestion would be to use the raw
command within your role tasks to bootstrap Python.
@Manigunner: What distro is play:8_jre_security
derived from?
Hi @j00bar , this is dervied play:8_jre_security from our docker file. I am not clear about the distro part. How to cross check that
What's the FROM
in your Dockerfile for it?
Hi @j00bar the FROM is p0xvoaxa0001.test.com:5000/test2/play:8_jre_security
Continue up the chain. What's the FROM in that Dockerfile? Alternatively, run an instance of that container image and look at /etc/issue
, /etc/redhat-release
, '/etc/lsb-release`, or other common markers for identifying a distro.
container.yml
version: '2' settings: conductor_base: centos:7 services: ansible.play_container: from: "play:8_jre_security" roles:
OS / ENVIRONMENT
Ansible Container, version 0.9.2 Linux, d1xvoaxa0027.directv.com, 3.10.0-327.13.1.el7.x86_64, #1 SMP Mon Feb 29 13:22:02 EST 2016, x86_64 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)] /usr/bin/python