bundles/icinga2: more auto-generation of stuff
This commit is contained in:
parent
7df6b1d13a
commit
d1bb94fd74
2 changed files with 35 additions and 35 deletions
|
@ -17,12 +17,8 @@ defaults = {
|
|||
'icinga2': {},
|
||||
'icinga2-ido-pgsql': {},
|
||||
'icingaweb2': {},
|
||||
|
||||
# apparently no longer needed
|
||||
#'icingaweb2-module-monitoring': {},
|
||||
|
||||
# neeeded for statusmonitor
|
||||
'python3-flask': {},
|
||||
'icingaweb2-module-monitoring': {},
|
||||
'python3-easysnmp': {},
|
||||
}
|
||||
},
|
||||
'icinga2': {
|
||||
|
@ -59,6 +55,21 @@ defaults = {
|
|||
'icingaweb2': {
|
||||
'setup-token': repo.vault.password_for(f'{node.name} icingaweb2 setup-token'),
|
||||
},
|
||||
'php': {
|
||||
'version': '8.2',
|
||||
'packages': {
|
||||
'curl',
|
||||
'gd',
|
||||
'intl',
|
||||
'imagick',
|
||||
'ldap',
|
||||
'mysql',
|
||||
'opcache',
|
||||
'pgsql',
|
||||
'readline',
|
||||
'xml',
|
||||
},
|
||||
},
|
||||
'postgresql': {
|
||||
'roles': {
|
||||
'icinga2': {
|
||||
|
@ -105,13 +116,26 @@ def add_users_from_json(metadata):
|
|||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'firewall/port_rules/5665',
|
||||
'nginx/vhosts/icingaweb2',
|
||||
'nginx/vhosts/icinga_statusmonitor',
|
||||
)
|
||||
def firewall(metadata):
|
||||
def nginx(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
return {
|
||||
'firewall': {
|
||||
'port_rules': {
|
||||
'5665': atomic(metadata.get('icinga2/restrict-to', set())),
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
'icingaweb2': {
|
||||
'domain': metadata.get('icinga2/web_domain'),
|
||||
'webroot': '/usr/share/icingaweb2/public',
|
||||
'locations': {
|
||||
'/api/': {
|
||||
'target': 'https://127.0.0.1:5665/',
|
||||
},
|
||||
},
|
||||
'extras': True,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue