Browse Source

roles/icinga2: config backend ini -> pgsql

(IcingaWeb2) Move configuration (user preferences) backend from INI
files to a dedicated pgSQL db.
python3
Zolfa 5 years ago
parent
commit
21b7a658ca
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
2 changed files with 14 additions and 1 deletions
  1. +2
    -1
      roles/icinga2/files/icingaweb2/config.ini
  2. +12
    -0
      roles/icinga2/tasks/main.yaml

+ 2
- 1
roles/icinga2/files/icingaweb2/config.ini View File

@ -1,6 +1,7 @@
[global]
show_stacktraces = "1"
config_backend = "ini"
config_backend = "db"
config_resource = "icingaweb2-config-pgsql"
[logging]
log = "syslog"


+ 12
- 0
roles/icinga2/tasks/main.yaml View File

@ -36,8 +36,13 @@
# ***** IcingaWeb2 *****
- name: 'PGSQL | IcingaWeb2 tunings'
block:
- name: 'PGSQL | create IcingaWeb2 user preference DB'
postgresql_db:
name: 'icingaweb2'
register: icingaweb2_db
- name: 'PGSQL | create IcingaWeb2 socket authentication user'
postgresql_user:
db: 'icingaweb2'
name: 'www-data'
priv: 'ALL'
- name: 'PGSQL | GRANT CONNECT to IDO'
@ -92,6 +97,13 @@
tags:
- 'packages'
- name: 'PGSQL | populate IcingaWeb2 user preference DB'
shell: 'cat /usr/share/icingaweb2/etc/schema/pgsql.schema.sql | psql -d icingaweb2'
become: true
become_method: 'su'
become_flags: '-p'
become_user: 'www-data'
when: icingaweb2_db.changed
- name: 'LDAP | upload client root ca'
copy:


Loading…
Cancel
Save