--- - name: Gather instance facts setup: - name: Update APT package cache apt: update_cache: "true" cache_valid_time: "3600" tags: - monit-install - name: Install monit package: name: "{{ packages }}" state: present vars: packages: - monit tags: - monit-install - block: - name: Setup monitrc template: src: monitrc dest: "/etc/monit/monitrc" owner: root group: root mode: 0644 tags: - monit-config - name: Setup filesystem monitoring template: src: filesystem dest: "/etc/monit/conf.d/{{item.name}}" owner: root group: root mode: 0644 loop: "{{ monit_filesystems }}" tags: - monit-config - monit-filesystems - name: Setup slideshow monitoring template: src: fim dest: "/etc/monit/conf.d/fim" owner: root group: root mode: 0644 tags: - monit-config - monit-fim