newbie - first playbook

been able to do simple ad-hoc commands but now trying to run a relatively simple playbook

ansible-playbook -C /etc/ansible/playbooks/apache/site.yml

[WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (i.e. yum update gmp).

PLAY [apply common configuration to all nodes] ********************************

GATHERING FACTS ***************************************************************
ok: [dbb001.stt.local]

PLAY [configure and deploy the webservers and application code] ***************

GATHERING FACTS ***************************************************************
ok: [dbb001.stt.local]

TASK: [web | Install http and php etc] ****************************************
failed: [dbb001.stt.local] => (item=httpd,php55u,git) => {“changed”: false, “failed”: true, “item”: “httpd,php55u,git”, “rc”: 0, “results”: }
msg: No Package matching ‘httpd’ found available, installed or updated

FATAL: all hosts have already failed – aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/root/site.retry

dbb001.stt.local : ok=2 changed=0 unreachable=0 failed=1

ansible --version

[WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (i.e. yum update gmp).

ansible 1.8.2
configured module search path = None

cat playbooks/apache/site.yml

Hi Craig, not quite sure here but it might be that your remote repos are not setup correctly on that system?

I wish it were the case that repos were the problem. On the subject system…

[root@dbb001 ~]# yum search httpd
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
============================== N/S Matched: httpd ==============================
httpd24u-debuginfo.x86_64 : Debug information for package httpd24u
libmicrohttpd-devel.i686 : Development files for libmicrohttpd
libmicrohttpd-devel.x86_64 : Development files for libmicrohttpd
libmicrohttpd-doc.noarch : Documentation for libmicrohttpd
httpd.x86_64 : Apache HTTP Server
httpd-devel.i686 : Development interfaces for the Apache HTTP server
httpd-devel.x86_64 : Development interfaces for the Apache HTTP server
httpd-manual.noarch : Documentation for the Apache HTTP server
httpd-tools.x86_64 : Tools for use with the Apache HTTP Server
httpd24u.x86_64 : Apache HTTP Server
httpd24u-devel.x86_64 : Development interfaces for the Apache HTTP server
httpd24u-filesystem.noarch : The basic directory layout for the Apache HTTP
: server
httpd24u-manual.noarch : Documentation for the Apache HTTP server
httpd24u-tools.x86_64 : Tools for use with the Apache HTTP Server
libmicrohttpd.i686 : Lightweight library for embedding a webserver in
: applications
libmicrohttpd.x86_64 : Lightweight library for embedding a webserver in
: applications
mod_auth_mellon.x86_64 : A SAML 2.0 authentication module for the Apache Httpd
: Server
mod_dav_svn.x86_64 : Apache httpd module for Subversion server
mod_dnssd.x86_64 : An Apache HTTPD module which adds Zeroconf support

Name and summary matches only, use “search all” for everything.

yum search doesn’t seem to have a problem finding packages that match ‘httpd’. Playbook does though

Can you post the contents of the tasks from the web role?

sure

cat roles/web/tasks/copy_code.yml

But this works if you use the ad-hoc command with the yum module to install httpd? Ie. ‘ansible -m yum -a “name=httpd state=present” ’?

No - same error

ansible -C -m yum -a “name=httpd state=present” dbb001.stt.local

dbb001.stt.local | FAILED >> {
“changed”: false,
“failed”: true,
“msg”: “No Package matching ‘httpd’ found available, installed or updated”,
“rc”: 0,
“results”:
}

but adding --sudo did work…

ansible -C -m yum -a “name=httpd state=present” dbb001rmdev02.stt-internal.local --sudo

dbb001.stt.local | success >> {
“changed”: true
}

So I am gathering that I don’t have sudo: yes in the right spot in site.yml

cat site.yml