--- - name: Intall monitorings plugins apt: name: monitoring-plugins state: present - name: Check if /usr is a partition shell: "mount | grep 'on /usr type'" args: warn: no changed_when: False failed_when: False check_mode: no register: usr_partition - name: Mount /usr in rw command: mount -o remount,rw /usr args: warn: no changed_when: False when: usr_partition.rc == 0 - name: Create Nagios plugins dir file: path: /usr/local/lib/nagios/plugins state: directory - name: Copy Tomcat instance check template: src: check_tomcat_instance.sh.j2 dest: /usr/local/lib/nagios/plugins/check_tomcat_instance.sh mode: "0755"