Update icinga2 role

This commit is contained in:
Nemo 2020-10-02 23:06:01 +02:00
parent 7e1caaa2f4
commit 7c77cba51e
10 changed files with 137 additions and 1 deletions

View file

@ -0,0 +1,63 @@
---
- name: Icingaweb2 config file deployed
template:
src: '{{ item }}.j2'
dest: '/etc/icingaweb2/{{ item }}'
owner: root
group: icingaweb2
mode: 0660
loop:
- config.ini
- resources.ini
- roles.ini
- groups.ini
- authentication.ini
no_log: True
- name: icingaweb2 modules directory created
file:
name: /etc/icingaweb2/modules/monitoring
state: directory
owner: root
group: icingaweb2
mode: 0750
- name: icingaweb2 enabledModules directory created
file:
name: /etc/icingaweb2/enabledModules
state: directory
owner: root
group: icingaweb2
mode: 0750
- name: icingaweb2 monitoring module enabled
file:
src: /usr/share/icingaweb2/modules/monitoring
dest: /etc/icingaweb2/enabledModules/monitoring
state: link
mode: 0750
- name: icingaweb2 monitoring module configured
template:
src: modules_config.ini.j2
dest: /etc/icingaweb2/modules/monitoring/config.ini
owner: root
group: icingaweb2
mode: 0660
- name: icingaweb2 monitoring module commandtransport configured
template:
src: modules_commandtransports.ini.j2
dest: /etc/icingaweb2/modules/monitoring/commandtransports.ini
owner: root
group: icingaweb2
mode: 0660
- name: icingaweb2 monitoring module backends configured
template:
src: modules_backends.ini.j2
dest: /etc/icingaweb2/modules/monitoring/backends.ini
owner: root
group: icingaweb2
mode: 0660

View file

@ -4,7 +4,8 @@
#- import_tasks: repository.yml #- import_tasks: repository.yml
#- import_tasks: install_icinga2.yml #- import_tasks: install_icinga2.yml
- import_tasks: install_mariadb.yml #- import_tasks: install_mariadb.yml
#- import_tasks: install_ido.yml #- import_tasks: install_ido.yml
#- import_tasks: configure_icinga2_api_feature.yml #- import_tasks: configure_icinga2_api_feature.yml
#- import_tasks: install_icingaweb2.yml #- import_tasks: install_icingaweb2.yml
- import_tasks: configure_icingaweb2.yml

View file

@ -0,0 +1,5 @@
;{{ ansible_managed }}
[icingaweb2]
backend = "db"
resource = "icingaweb_db"

View file

@ -0,0 +1,19 @@
;{{ ansible_managed }}
[global]
show_stacktraces = "1"
show_application_state_messages = "1"
config_backend = "db"
config_resource = "icingaweb_db"
module_path = "/usr/share/icingaweb2/modules"
[logging]
log = "syslog"
level = "ERROR"
application = "icingaweb2"
facility = "user"
[themes]
[authentication]

View file

@ -0,0 +1,5 @@
;{{ ansible_managed }}
[icingaweb2]
backend = "db"
resource = "icingaweb_db"

View file

@ -0,0 +1,5 @@
;{{ ansible_managed }}
[icinga]
type = "ido"
resource = "icinga_ido"

View file

@ -0,0 +1,5 @@
;{{ ansible_managed }}
[icinga2]
transport = "local"
path = "/var/run/icinga2/cmd/icinga2.cmd"

View file

@ -0,0 +1,4 @@
;{{ ansible_managed }}
[security]
protected_customvars = "*pw*,*pass*,community"

View file

@ -0,0 +1,23 @@
;{{ ansible_managed }}
[icingaweb_db]
type = "db"
db = "mysql"
host = "localhost"
port = "3306"
dbname = "icingaweb2"
username = "icingaweb2_user"
password = "{{ vault_icinga2_server_mariadb_users_icingaweb2_password }}"
charset = "UTF8"
use_ssl = "0"
[icinga_ido]
type = "db"
db = "mysql"
host = "localhost"
port = "3306"
dbname = "icinga"
username = "icinga_user"
password = "{{ vault_icinga2_server_mariadb_users_icinga_password }}"
charset = "UTF8"
use_ssl = "0"

View file

@ -0,0 +1,6 @@
;{{ ansible_managed }}
[Administrators]
users = "john"
permissions = "*"
groups = "Administrators"