
- monitored_packages_additional (both SSH and NRPE) - monitored_packages_additional_nrpe (NRPE only) - monitored_packages_additional_ssh (SSH only)
32 lines
1 KiB
YAML
32 lines
1 KiB
YAML
---
|
|
- 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).split(' ')[0] }}-{{ (ansible_distribution_version|lower).split(' ')[0] }}.yml"
|
|
- "{{ (ansible_distribution|lower).split(' ')[0] }}-{{ (ansible_distribution_major_version|lower).split(' ')[0] }}.yml"
|
|
- "{{ (ansible_distribution|lower).split(' ')[0] }}.yml"
|
|
- "{{ (ansible_os_family|lower).split(' ')[0] }}.yml"
|
|
- "defaults.yml"
|
|
|
|
- name: "INCLUDE: Create monitoring user"
|
|
import_tasks: user.yml
|
|
|
|
- name: "INCLUDE: Install always necessary packages"
|
|
include_tasks: packages.yml
|
|
when: monitored_packages_install != False
|
|
|
|
- name: "INCLUDE: Monitoring by NRPE"
|
|
include_tasks: nrpe.yml
|
|
when: monitored_by_nrpe == True
|
|
|
|
- name: "INCLUDE: Monitoring by SSH"
|
|
include_tasks: ssh.yml
|
|
when: monitored_by_ssh == True
|
|
|