Update icinga2 role
This commit is contained in:
parent
7e1caaa2f4
commit
7c77cba51e
63
roles/icinga2_server/tasks/configure_icingaweb2.yml
Normal file
63
roles/icinga2_server/tasks/configure_icingaweb2.yml
Normal 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
|
||||||
|
|
|
@ -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
|
||||||
|
|
5
roles/icinga2_server/templates/authentication.ini.j2
Normal file
5
roles/icinga2_server/templates/authentication.ini.j2
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
;{{ ansible_managed }}
|
||||||
|
|
||||||
|
[icingaweb2]
|
||||||
|
backend = "db"
|
||||||
|
resource = "icingaweb_db"
|
19
roles/icinga2_server/templates/config.ini.j2
Normal file
19
roles/icinga2_server/templates/config.ini.j2
Normal 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]
|
||||||
|
|
5
roles/icinga2_server/templates/groups.ini.j2
Normal file
5
roles/icinga2_server/templates/groups.ini.j2
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
;{{ ansible_managed }}
|
||||||
|
|
||||||
|
[icingaweb2]
|
||||||
|
backend = "db"
|
||||||
|
resource = "icingaweb_db"
|
5
roles/icinga2_server/templates/modules_backends.ini.j2
Normal file
5
roles/icinga2_server/templates/modules_backends.ini.j2
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
;{{ ansible_managed }}
|
||||||
|
|
||||||
|
[icinga]
|
||||||
|
type = "ido"
|
||||||
|
resource = "icinga_ido"
|
|
@ -0,0 +1,5 @@
|
||||||
|
;{{ ansible_managed }}
|
||||||
|
|
||||||
|
[icinga2]
|
||||||
|
transport = "local"
|
||||||
|
path = "/var/run/icinga2/cmd/icinga2.cmd"
|
4
roles/icinga2_server/templates/modules_config.ini.j2
Normal file
4
roles/icinga2_server/templates/modules_config.ini.j2
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
;{{ ansible_managed }}
|
||||||
|
|
||||||
|
[security]
|
||||||
|
protected_customvars = "*pw*,*pass*,community"
|
23
roles/icinga2_server/templates/resources.ini.j2
Normal file
23
roles/icinga2_server/templates/resources.ini.j2
Normal 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"
|
6
roles/icinga2_server/templates/roles.ini.j2
Normal file
6
roles/icinga2_server/templates/roles.ini.j2
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
;{{ ansible_managed }}
|
||||||
|
|
||||||
|
[Administrators]
|
||||||
|
users = "john"
|
||||||
|
permissions = "*"
|
||||||
|
groups = "Administrators"
|
Loading…
Reference in a new issue