From b6efa9b1c98abd8096794fe61017424f1e300288 Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 1 Aug 2020 20:39:44 -0500 Subject: [PATCH] Remove Nagios --- inventory/group_vars/9iron.club.yml | 10 ---- roles/nagios/defaults/main.yml | 2 - roles/nagios/handlers/main.yml | 8 --- roles/nagios/meta/main.yml | 5 -- roles/nagios/tasks/main.yml | 50 ------------------- roles/nagios/templates/apache2-vhost-ssl.conf | 32 ------------ 6 files changed, 107 deletions(-) delete mode 100644 roles/nagios/defaults/main.yml delete mode 100644 roles/nagios/handlers/main.yml delete mode 100644 roles/nagios/meta/main.yml delete mode 100644 roles/nagios/tasks/main.yml delete mode 100644 roles/nagios/templates/apache2-vhost-ssl.conf diff --git a/inventory/group_vars/9iron.club.yml b/inventory/group_vars/9iron.club.yml index e396640..f469c25 100644 --- a/inventory/group_vars/9iron.club.yml +++ b/inventory/group_vars/9iron.club.yml @@ -83,16 +83,6 @@ matrix_server_name: "9iron.club" matrix_url: "matrix.9iron.club" matrix_enable_registration: "true" matrix_admin_contact: "mailto:rehashedsalt@cock.li" -# Nagios -nagios_master: web2.9iron.club -nagios_user_name: salt -nagios_user_password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 35353561366233326536313430346266663631663137366130396435363932333766306438323166 - 6437353630373631393938396232343065396162313732610a653433323466613636393437656663 - 33396133643730636632613637653164666638346562656463613931663831373039313632363863 - 3062393539633736610a303932383066663638636165363736323738323838366233333338636636 - 39663064356363656130386235333566636566303263363365363933656231373733 # Nextcloud nextcloud_mysql_password: !vault | $ANSIBLE_VAULT;1.1;AES256 diff --git a/roles/nagios/defaults/main.yml b/roles/nagios/defaults/main.yml deleted file mode 100644 index c62066a..0000000 --- a/roles/nagios/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -# vim:ft=ansible: -nagios_webroot: /usr/share/nagios3/htdocs diff --git a/roles/nagios/handlers/main.yml b/roles/nagios/handlers/main.yml deleted file mode 100644 index e49f98b..0000000 --- a/roles/nagios/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/ansible-playbook -# vim:ft=ansible: ---- -- name: restart nagios - systemd: - name: nagios - state: restarted - become: yes diff --git a/roles/nagios/meta/main.yml b/roles/nagios/meta/main.yml deleted file mode 100644 index 794fc07..0000000 --- a/roles/nagios/meta/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -allow_duplicates: no -dependencies: - - role: apache-php - - role: postfix-ses diff --git a/roles/nagios/tasks/main.yml b/roles/nagios/tasks/main.yml deleted file mode 100644 index 44d6741..0000000 --- a/roles/nagios/tasks/main.yml +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/ansible-playbook -# vim:ft=ansible: ---- -- name: Install and configure Nagios - block: - - name: Install packages - block: - - name: Install Nagios package - apt: - name: - - nagios3 - - name: Set up Apache - block: - - name: Enable modules - command: - cmd: a2enmod "{{ item }}" - creates: "/etc/apache2/mods-enabled/{{ item }}.load" - loop: - - cgi - - rewrite - notify: restart apache - - name: Assure admin user - htpasswd: - path: /etc/nagios3/htpasswd.users - name: "{{ nagios_user_name }}" - password: "{{ nagios_user_password }}" - notify: restart nagios - - name: Template out vhost - template: - src: "apache2-vhost-ssl.conf" - dest: "/etc/apache2/sites-available/{{ nagios_url }}.conf" - notify: restart apache - - name: Enable site - command: - cmd: "a2ensite {{ nagios_url }}.conf" - creates: "/etc/apache2/sites-enabled/{{ nagios_url }}.conf" - notify: restart apache - - name: Generate certificate - include_role: - name: https - vars: - website_url: "{{ nagios_url }}" - - name: Configure Nagios - block: - - name: Enable service - systemd: - name: nagios3 - enabled: yes - state: started - become: yes diff --git a/roles/nagios/templates/apache2-vhost-ssl.conf b/roles/nagios/templates/apache2-vhost-ssl.conf deleted file mode 100644 index be9df7a..0000000 --- a/roles/nagios/templates/apache2-vhost-ssl.conf +++ /dev/null @@ -1,32 +0,0 @@ -# Configuration for {{ nagios_url }} -# vim:ft=apache: - -# Accept connections from non-SNI clients -SSLStrictSNIVHostCheck off - -# Website configuration - - ServerName {{ nagios_url }} - Redirect permanent / https://{{ nagios_url }} - - - SSLEngine on - SSLCertificateFile /etc/pki/cert/crt/{{ nagios_url }}.crt - SSLCertificateKeyFile /etc/pki/cert/private/{{ nagios_url }}.key - SSLCertificateChainFile /etc/pki/cert/crt/{{ nagios_url}}-fullchain.crt - SSLProtocol {{ ssl_protocol }} - SSLCipherSuite {{ ssl_cipher_suite }} - \ - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - ServerName {{ nagios_url }} - DocumentRoot {{ nagios_webroot }} - - Require all granted - AllowOverride All - Options MultiViews FollowSymlinks - -