Hi,
I’m sorry if this issue has been posted/discussed before, but I tried searching and couldn’t find anything related. I get the following output when I try to run a simple playbook.
[root@atk ansible]# ansible-playbook pre_identix.yml --ask-become-pass
SUDO password:
PLAY [all] *********************************************************************
TASK [setup] *******************************************************************
ok: [localhost]
ok: [192.168.1.20]
ok: [192.168.1.18]
ok: [192.168.1.19]
TASK [Ping all hosts] **********************************************************
ok: [localhost]
ok: [192.168.1.18]
ok: [192.168.1.20]
ok: [192.168.1.19]
TASK [Verify SSH is installed] *************************************************
ok: [localhost]
ok: [192.168.1.18]
ok: [192.168.1.20]
ok: [192.168.1.19]
TASK [Verify sshd service is enabled and running] ******************************
ok: [localhost]
ok: [192.168.1.18]
ok: [192.168.1.20]
ok: [192.168.1.19]
TASK [Verify third-party packages are installed] *******************************
ok: [localhost] => (item=[u’libpng.x86_64’, u’jasper-libs.x86_64’, u’openjpeg-libs.x86_64’, u’jq.x86_64’, u’libtiff.x86_64’, u’libX11.x86_64’, u’unzip.x86_64’])
failed: [192.168.1.18] (item=[u’libpng.x86_64’, u’jasper-libs.x86_64’, u’openjpeg-libs.x86_64’, u’jq.x86_64’, u’libtiff.x86_64’, u’libX11.x86_64’, u’unzip.x86_64’]) => {“changed”: false, “failed”: true, “item”: [“libpng.x86_64”, “jasper-libs.x86_64”, “openjpeg-libs.x86_64”, “jq.x86_64”, “libtiff.x86_64”, “libX11.x86_64”, “unzip.x86_64”], “msg”: “No package matching ‘jq.x86_64’ found available, installed or updated”, “rc”: 126, “results”: [“libpng-2:1.5.13-7.el7_2.x86_64 providing libpng.x86_64 is already installed”, “jasper-libs-1.900.1-29.el7.x86_64 providing jasper-libs.x86_64 is already installed”, “No package matching ‘jq.x86_64’ found available, installed or updated”]}
failed: [192.168.1.20] (item=[u’libpng.x86_64’, u’jasper-libs.x86_64’, u’openjpeg-libs.x86_64’, u’jq.x86_64’, u’libtiff.x86_64’, u’libX11.x86_64’, u’unzip.x86_64’]) => {“changed”: false, “failed”: true, “item”: [“libpng.x86_64”, “jasper-libs.x86_64”, “openjpeg-libs.x86_64”, “jq.x86_64”, “libtiff.x86_64”, “libX11.x86_64”, “unzip.x86_64”], “msg”: “No package matching ‘jq.x86_64’ found available, installed or updated”, “rc”: 126, “results”: [“libpng-2:1.5.13-7.el7_2.x86_64 providing libpng.x86_64 is already installed”, “jasper-libs-1.900.1-29.el7.x86_64 providing jasper-libs.x86_64 is already installed”, “No package matching ‘jq.x86_64’ found available, installed or updated”]}
failed: [192.168.1.19] (item=[u’libpng.x86_64’, u’jasper-libs.x86_64’, u’openjpeg-libs.x86_64’, u’jq.x86_64’, u’libtiff.x86_64’, u’libX11.x86_64’, u’unzip.x86_64’]) => {“changed”: false, “failed”: true, “item”: [“libpng.x86_64”, “jasper-libs.x86_64”, “openjpeg-libs.x86_64”, “jq.x86_64”, “libtiff.x86_64”, “libX11.x86_64”, “unzip.x86_64”], “msg”: “No package matching ‘jq.x86_64’ found available, installed or updated”, “rc”: 126, “results”: [“libpng-2:1.5.13-7.el7_2.x86_64 providing libpng.x86_64 is already installed”, “jasper-libs-1.900.1-29.el7.x86_64 providing jasper-libs.x86_64 is already installed”, “No package matching ‘jq.x86_64’ found available, installed or updated”]}
NO MORE HOSTS LEFT *************************************************************
PLAY RECAP *********************************************************************
192.168.1.18 : ok=4 changed=0 unreachable=0 failed=1
192.168.1.19 : ok=4 changed=0 unreachable=0 failed=1
192.168.1.20 : ok=4 changed=0 unreachable=0 failed=1
localhost : ok=5 changed=0 unreachable=0 failed=0
The manually ssh’d to a couple of the hosts and the packages it says are failing are already installed and updated, so why does Ansible return a failed status? My version of Ansible is ansible-2.2.1.0-1.el7.noarch. My playbook is below, for review.