Commit c7ddd09f authored by Dan Thomson's avatar Dan Thomson

[#1] Initial commit

parents
[![pipeline status](https://gitlab.triumf.ca/ansible/roles/nagios-nrpe-agent/badges/master/pipeline.svg)](https://gitlab.triumf.ca/ansible/roles/nagios-nrpe-agent/commits/master)
# Nagios NRPE Agent
This role is responsible for installing a local NPRE agent that can be accessed
by some remote nagios monitor.
# General role defaults
packages: []
# npre.cfg values
pid_file: /var/run/nrpe/nrpe.pid
server_port: 5666
nrpe_user: nrpe
nrpe_group: nrpe
debug: 0
command_timeout: 60
connection_timeout: 300
allowed_hosts:
- 127.0.0.1
# Do not allow command arguments for security reasons
dont_blame_nrpe: 0
# Include definitions from config files (with a .cfg extension)
include_dir: []
- name: Install dependencies
yum:
name: "{{ package }}"
state: latest
with_items: "{{ packages }}"
loop_control:
loop_var: package
become: yes
- name: Load {{ ansible_distribution }} {{ ansible_distribution_major_version }} variables
include_vars: "{{ file | basename }}" # This include_vars module is kind of dumb, so we need to test the full path but only include basename
with_first_found:
- files:
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family | lower }}.yml"
- "{{ role_path }}/vars/default.yml"
skip: true
loop_control:
loop_var: file
- name: Load {{ ansible_distribution }} {{ ansible_distribution_major_version }} dependencies
include_tasks: "{{ file }}"
with_first_found:
- files:
- "tasks/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-dependencies.yml"
- "tasks/{{ ansible_distribution | lower }}-dependencies.yml"
- "tasks/{{ ansible_os_family | lower }}-dependencies.yml"
- "tasks/default-dependencies.yml"
skip: true
loop_control:
loop_var: file
packages:
- sudo
- nrpe
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment