newbie nagios client deployment problem

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:

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

That worked! Thanks so much!