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" <hostname>'?

On Tue, Feb 10, 2015 at 11:24 AM, Craig White <[email protected]> wrote:

> sure
>
> # cat roles/web/tasks/copy_code.yml
> ---
> # These tasks are responsible for copying the latest dev/production code
> from
> # the version control system.
>
> #- name: Copy the code from repository
> #  git: repo={{ repository }} dest=/var/www/html/
>
> - name: Creates the index.php file
>   template: src=index.php.j2 dest=/var/www/html/index.php
>
> # cat roles/web/tasks/install_httpd.yml
> ---
> # These tasks install http and the php modules.
>
> - name: Install http and php etc
>   yum: name={{ item }} state=present
>   with_items:
>    - httpd
>    - php55u
>    - git
>
>
> - name: http service state
>   service: name=httpd state=started enabled=yes
>
> # cat roles/web/tasks/main.yml
> ---
> - include: install_httpd.yml
> - include: copy_code.yml
>
>
> On Tuesday, February 10, 2015 at 9:36:53 AM UTC-7, Mark McCoy wrote:
>>
>> Can you post the contents of the tasks from the web role?
>>
>> ----
>> Mark McCoy <http://markmccoy.us>
>>
>>
>> On Tue, Feb 10, 2015 at 10:23 AM, Craig White <[email protected]> wrote:
>>
>>> 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
>>>
>>>
>>> On Monday, February 9, 2015 at 11:25:49 PM UTC-7, James Cammarata wrote:
>>>>
>>>> Hi Craig, not quite sure here but it might be that your remote repos
>>>> are not setup correctly on that system?
>>>>
>>>> On Mon, Feb 9, 2015 at 2:53 PM, Craig White <[email protected]> wrote:
>>>>
>>>>> 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
>>>>> ---
>>>>> # This playbook deploys the whole application stack in this site.
>>>>>
>>>>> - name: apply common configuration to all nodes
>>>>>   hosts: dbb001.stt.local
>>>>>   remote_user: rundeck
>>>>>
>>>>>   roles:
>>>>>     - common
>>>>>
>>>>> - name: configure and deploy the webservers and application code
>>>>>   hosts: dbb001.stt.local
>>>>>   remote_user: rundeck
>>>>>
>>>>>   roles:
>>>>>     - web
>>>>>
>>>>> Why is it saying there is 'No Package matching 'httpd' found
>>>>> available?  RHEL 6.6
>>>>>
>>>>> Thanks
>>>>> Craig
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Ansible Project" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/ansible-project/7cb499d4-1708-49fa-9f43-a7a60972aee7%
>>>>> 40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/ansible-project/7cb499d4-1708-49fa-9f43-a7a60972aee7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/ansible-project/6924a9f4-d5ef-4110-a43b-
>>> 0b9c64313a51%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/6924a9f4-d5ef-4110-a43b-0b9c64313a51%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/82398e90-cb27-4297-8c72-08227d40491e%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/82398e90-cb27-4297-8c72-08227d40491e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAMFyvFhxmYbLSoHmpEyKjMyN%2BKsPxgeOd5ZBeRbzz8%2B4zNMPLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to