diff --git a/ubuntu/roles/icinga-client/tasks/main.yml b/ubuntu/roles/icinga-client/tasks/main.yml new file mode 100644 index 0000000..c031f3a --- /dev/null +++ b/ubuntu/roles/icinga-client/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# This role installs Icinga 2 and the plugins required on a Icinga client nodes + +- name: Add Icinga package repository key + apt_key: url="https://packages.icinga.com/icinga.key" state=present +- name: Add Icinga apt repository + apt_repository: repo="https://packages.icinga.com/ubuntu icinga-xenial main" state=present +- name: Update apt cache and install Icinga packages + apt: name={{ item }} state=latest update_cache=yes + with_items: + - icinga2 + - monitoring-plugins +- name: Ensure that icinga2 systemd service is enabled + systemd: + name: icinga2 + enabled: yes diff --git a/ubuntu/site.yml b/ubuntu/site.yml index 58ad73c..fb698d0 100644 --- a/ubuntu/site.yml +++ b/ubuntu/site.yml @@ -14,6 +14,13 @@ roles: - php +- name: install Icinga 2 for client usage + host: icinga-clients + user: root + + role: + - icinga-client + #- name: Generate LE certs on required servers # hosts: webservers # user: root @@ -73,7 +80,7 @@ - listen [{{ ansible_default_ipv6.address }}]:443 ssl http2 - server_name entropynet.net - root "/srv/www/entropynet.net" - - error_page 404 /404.html + - error_page 404 /404.html - index index.html - access_log "/var/log/nginx/entropynet.net.access.log" - error_log "/var/log/nginx/entropynet.net.error.log"