That worked! Thanks so much!
On Monday, June 13, 2016 at 1:39:44 PM UTC-4, Thomas Steele wrote:
>
> I'm trying to get a playbook that will download, untar, configure and make
> nagios client on a rhel7 server. So far the download and untar are working
> perfectly, but the configure and make commands are not running properly.
> Going to the server itself and running ./configure and make works
> perfectly. Any help is greatly appreciated.
>
> *playbook:*
> ---
> - name: new nagios client install
> hosts: ewok
> remote_user: fscan
> become: yes
> become_method: sudo
> become_user: root
> roles:
> - nagios
>
> *role:*
> ---
> - name: create Nagios user
> user: name=nagios shell=/bin/bash comment="nagios user"
>
> - name: install gcc
> yum: state=present name=gcc
>
> - name: install xinetd
> yum: state=present name=xinetd
>
> - name: install openssl-devel
> yum: state=present name=openssl-devel
>
> - name: create install directory
> file: path=/tmp/download/ state=directory
>
> - name: transfer and untar nagios-plugins
> unarchive: src=files/nagios-plugins-2.0.3.tar.gz dest=/tmp/download
> mode=0755
>
> - name: ownership managment
> file: path=/tmp/download/ state=directory recurse=yes owner=fscan
> group=fscan
>
>
>
> *- name: configure nagios command:
> /tmp/download/nagios-plugins-2.0.3/configure*
>
> *- name: make files command: /tmp/download/nagios-plugins-2.0.3 make;make
> install*
>
> - name: change permissions
> file: path=/usr/local/nagios recurse=yes owner=nagios group=nagios
>
>
>
> fscan@browns:/etc/ansible/playbooks/tsteele ansible-playbook
> tsteele_nagios_client_install.yml
>
> PLAY [new nagios client install]
> ***********************************************
>
> TASK [setup]
> *******************************************************************
> ok: [ewok]
>
> TASK [nagios : create Nagios user]
> *********************************************
> ok: [ewok]
>
> TASK [nagios : install gcc]
> ****************************************************
> ok: [ewok]
>
> TASK [nagios : install xinetd]
> *************************************************
> ok: [ewok]
>
> TASK [nagios : install openssl-devel]
> ******************************************
> ok: [ewok]
>
> TASK [nagios : create install directory]
> ***************************************
> changed: [ewok]
>
> TASK [nagios : transfer and untar nagios-plugins]
> ******************************
> changed: [ewok]
>
> TASK [nagios : ownership managment]
> ********************************************
> changed: [ewok]
>
>
>
>
>
>
> *TASK [nagios : configure nagios]
> ***********************************************changed: [ewok]TASK [nagios
> : make files] *****************************************************fatal:
> [ewok]: FAILED! => {"changed": false, "cmd":
> "/tmp/download/nagios-plugins-2.0.3 'make;make' install", "failed": true,
> "msg": "[Errno 13] Permission denied", "rc": 13}*
> NO MORE HOSTS LEFT
> *************************************************************
> to retry, use: --limit @tsteele_nagios_client_install.retry
>
> PLAY RECAP
> *********************************************************************
> ewok : ok=10 changed=5 unreachable=0 failed=1
>
>
--
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/6924821d-fbca-44fb-a7f3-a3a0f4b7ed6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.