# newbie nagios client deployment problem

**URL:** <https://forum.ansible.com/t/newbie-nagios-client-deployment-problem/21756>\
**Category:** Ansible Project\
**Created:** [June 13, 2016, 5:33pm UTC](https://forum.ansible.com/t/newbie-nagios-client-deployment-problem/21756 "2016-06-13T17:33:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Steele](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@Thomas\_Steele](https://forum.ansible.com/u/Thomas_Steele)\
**Post date:** [June 13, 2016, 5:33pm UTC](https://forum.ansible.com/t/newbie-nagios-client-deployment-problem/21756/1 "2016-06-13T17:33:28Z")

</div>

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:**

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 13, 2016, 6:04pm UTC](https://forum.ansible.com/t/newbie-nagios-client-deployment-problem/21756/2 "2016-06-13T18:04:30Z")

</div>

> 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.

Use chdir

> - name: configure nagios

\> command: /tmp/download/nagios-plugins-2.0.3/configure

- name: configure nagios  
&nbsp;&nbsp;&nbsp;command: ./configure  
&nbsp;&nbsp;&nbsp;args:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chdir: /tmp/download/nagios-plugins-2.0.3

> - name: make files

\> command: /tmp/download/nagios-plugins-2.0.3 make;make install

The semicolon is a shell operation, command doesn't support that. You will have to use shell, split it in two or use with\_items.

And maybe something like this will work:  
- name: configure, make and make install nagios  
&nbsp;&nbsp;&nbsp;command: "{{ item }}"  
&nbsp;&nbsp;&nbsp;args:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chdir: /tmp/download/nagios-plugins-2.0.3  
&nbsp;&nbsp;&nbsp;with\_items:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- ./configure  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- make  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- make install

---

<div class="post-metadata">

**Author:** ![Thomas\_Steele](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@Thomas\_Steele](https://forum.ansible.com/u/Thomas_Steele)\
**Post date:** [June 13, 2016, 6:54pm UTC](https://forum.ansible.com/t/newbie-nagios-client-deployment-problem/21756/3 "2016-06-13T18:54:48Z")

</div>

That worked! Thanks so much!
