--- - fail: msg="This system should not be monitored" when: monitored_dont is defined - fail: msg="Neither monitored_by_(ssh|nrpe) is set" when: monitored_by_nrpe == False and monitored_by_ssh == False - name: Gather OS Specific Variables include_vars: "{{ item }}" with_first_found: - "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml" - "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution|lower }}.yml" - "{{ ansible_os_family|lower }}.yml" - "defaults.yml" - include: user.yml - include: packages.yml when: monitored_packages_install != False - include: nrpe.yml when: monitored_by_nrpe == True - include: ssh.yml when: monitored_by_ssh == True