bundles/icinga2: add dependencies for icingaweb2 setup

This commit is contained in:
Franzi 2020-11-21 08:57:46 +01:00
parent 7fba53245a
commit d3de7a27be
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 35 additions and 1 deletions

View file

@ -3,6 +3,16 @@ assert node.has_bundle('sshmon')
from os.path import join from os.path import join
directories = {
'/etc/icingaweb2': {
'group': 'icingaweb2',
'mode': '0775',
'needs': {
'pkg_apt:icingaweb2',
},
},
}
files = { files = {
'/usr/local/share/icinga/plugins/check_rbl': { '/usr/local/share/icinga/plugins/check_rbl': {
'mode': '0755', 'mode': '0755',
@ -18,5 +28,10 @@ files = {
'needs': { 'needs': {
'pkg_apt:icinga2-ido-pgsql', 'pkg_apt:icinga2-ido-pgsql',
}, },
} },
'/etc/icingaweb2/setup.token': {
'content': node.metadata['icingaweb2']['setup-token'],
'mode': '0660',
'group': 'icingaweb2',
},
} }

View file

@ -22,6 +22,9 @@ defaults = {
'libreadonly-perl': {}, 'libreadonly-perl': {},
} }
}, },
'icingaweb2': {
'setup-token': repo.vault.password_for(f'{node.name} icingaweb2 setup-token'),
},
'postgresql': { 'postgresql': {
'roles': { 'roles': {
'icinga2': { 'icinga2': {
@ -29,6 +32,9 @@ defaults = {
}, },
}, },
'databases': { 'databases': {
'icingaweb2': {
'owner': 'icinga2',
},
'icinga2': { 'icinga2': {
'owner': 'icinga2', 'owner': 'icinga2',
}, },

View file

@ -6,6 +6,10 @@
fastcgi_param ICINGAWEB_CONFIGDIR /etc/icingaweb2; fastcgi_param ICINGAWEB_CONFIGDIR /etc/icingaweb2;
} }
location = / {
return 301 https://$host/authentication/login;
}
location / { location / {
try_files $1 $uri $uri/ /index.php$is_args$args; try_files $1 $uri $uri/ /index.php$is_args$args;
} }

View file

@ -19,6 +19,11 @@ nodes['ovh.icinga2'] = {
'gateway6': '2001:41d0:701:1100::1' 'gateway6': '2001:41d0:701:1100::1'
}, },
}, },
'apt': {
'packages': {
'php-imagick': {},
},
},
'nginx': { 'nginx': {
'vhosts': { 'vhosts': {
'icingaweb': { 'icingaweb': {
@ -31,7 +36,11 @@ nodes['ovh.icinga2'] = {
'php': { 'php': {
'version': '7.4', 'version': '7.4',
'packages': { 'packages': {
'curl',
'gd',
'intl',
'json', 'json',
'ldap',
'opcache', 'opcache',
'pgsql', 'pgsql',
'readline', 'readline',