Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Ansible is not being installed for Centos:7 based microservice images #42

Open
zsoltburger opened this issue May 3, 2020 · 1 comment

Comments

@zsoltburger
Copy link

I am running a full build and it stops with:

2020/05/03 14:27:29 casservices:19.06.1-20200503142552-c96ed66 container build [ERROR] casservices: map[code:127 message:The command '/bin/sh -c ansible-playbook -vv /ansible/playbook.yml --extra-vars layer=ansible --extra-vars PLAYBOOK_SRV=${PLAYBOOK_SRV} --extra-vars container_name=casservices' returned a non-zero code: 127]

Debugging: builds/full-2020-05-03-14-26-09/sas-viya-casservices/log.txt

If I check the log it says:

[container.go:403] &{Step 1/21 : FROM centos:7  <nil>}
...
[container.go:403] &{Step 7/21 : RUN if [ "$PLATFORM" = "redhat" ]; then         yum install --assumeyes ansible;               rm -rf /root/.cache /var/cache/yum;             echo -e "minrate=1" >> /etc/yum.conf;           echo -e "timeout=300" >> /etc/yum.conf;     elif [ "$PLATFORM" = "suse" ]; then         zypper install --no-confirm ansible curl && rm -rf /var/cache/zypp;     else            echo -e "Platform $PLATFORM not supported";             exit 1;     fi  <nil>}
[container.go:403] &{  <nil>}
[container.go:403] &{---> Using cache  <nil>}
[container.go:403] &{---> 8225643878b4  <nil>}
...
[container.go:403] &{ESC[91m/bin/sh: ansible-playbook: command not found

Having a look at the container, it seems the ansible is not installed.

As a workaround, I added
yum install --assumeyes epel-release;\
before
yum install --assumeyes ansible; \
in container.go.

After that, the build went on.

@hskiba
Copy link

hskiba commented May 3, 2020

I ran into this issue as well... I ended up using a different Docker base image with EPEL installed that I created.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants