On 13. juni 2016 19:33, 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.
>
Use chdir
> - name: configure nagios
> command: /tmp/download/nagios-plugins-2.0.3/configure
- name: configure nagios
command: ./configure
args:
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
command: "{{ item }}"
args:
chdir: /tmp/download/nagios-plugins-2.0.3
with_items:
- ./configure
- make
- make install
--
Kai Stian Olstad