- monitoring-scripts
- nagios
-# configure nagios (Except OpenSUSE and CentOS 9 Stream)
+# configure nagios (Except CentOS 9 Stream)
- import_tasks: nagios.yml
- when:
- - ansible_pkg_mgr != "zypper"
- - not (ansible_distribution == "CentOS" and ansible_distribution_major_version == "9")
+ when: not (ansible_distribution == "CentOS" and ansible_distribution_major_version == "9")
tags:
- nagios
---
-- name: Include apt_system vars
- include_vars: apt_systems.yml
- when: ansible_pkg_mgr == "apt"
-
-- name: Include yum_systems vars
- include_vars: yum_systems.yml
- when: ansible_os_family == "RedHat"
+- name: "Include {{ ansible_pkg_mgr }}_system vars"
+ include_vars: "{{ ansible_pkg_mgr }}_systems.yml"
# Returns 0 if found and 1 if not found
# Task fails if not found. Hence ignore_errors: true
- ansible_os_family == "RedHat"
- have_epel.rc == 0
-- name: Install nrpe package and dependencies (Ubuntu/Fedora)
+- name: Install nrpe package and dependencies (non-RHEL/CentOS)
package:
name: "{{ nrpe_packages|list }}"
state: latest
- when: ansible_pkg_mgr == "apt" or ansible_distribution == "Fedora"
+ when: ansible_os_family != "RedHat"
- name: Upload nagios sudoers.d for raid utilities.
template: