77 lines
2.4 KiB
Python
77 lines
2.4 KiB
Python
defaults = {
|
|
'backups': {
|
|
'paths': {
|
|
'/opt/matrix-dimension',
|
|
'/var/opt/matrix-dimension',
|
|
},
|
|
},
|
|
'matrix-dimension': {
|
|
'install_dir': '/opt/matrix-dimension',
|
|
'data_dir': '/var/opt/matrix-dimension',
|
|
'database': {
|
|
'user': 'matrix-dimension',
|
|
'password': repo.vault.password_for('{} postgresql matrix-dimension'.format(node.name)),
|
|
'database': 'matrix-dimension',
|
|
},
|
|
},
|
|
'postgresql': {
|
|
'roles': {
|
|
'matrix-dimension': {
|
|
'password': repo.vault.password_for('{} postgresql matrix-dimension'.format(node.name)),
|
|
},
|
|
},
|
|
'databases': {
|
|
'matrix-dimension': {
|
|
'owner': 'matrix-dimension',
|
|
},
|
|
},
|
|
},
|
|
'users': {
|
|
'matrix-support': {
|
|
'home': '/var/opt/matrix-dimension',
|
|
},
|
|
},
|
|
}
|
|
|
|
@metadata_reactor.provides(
|
|
'nginx/vhosts',
|
|
)
|
|
def nginx_config(metadata):
|
|
return {
|
|
'nginx': {
|
|
'vhosts': {
|
|
metadata.get('matrix-dimension/url'): {
|
|
'webroot': '/var/www/{}/webapp/'.format(metadata.get('matrix-dimension/url')),
|
|
'do_not_set_content_security_headers': True,
|
|
'max_body_size': '50M',
|
|
'locations': {
|
|
'/': {
|
|
'target': 'http://127.0.0.1:8184',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'icinga2_api/matrix-dimension/services',
|
|
)
|
|
def icinga_check_for_new_release(metadata):
|
|
return {
|
|
'icinga2_api': {
|
|
'matrix-dimension': {
|
|
'services': {
|
|
'MATRIX-DIMENSION UPDATE': {
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_github_for_new_release turt2live/matrix-dimension {}'.format(metadata.get('matrix-dimension/version')),
|
|
'vars.notification.mail': True,
|
|
'check_interval': '60m',
|
|
},
|
|
#'MATRIX-DIMENSION PROCESS': {
|
|
# 'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -a mautrix-telegram -c 1:',
|
|
#},
|
|
},
|
|
},
|
|
},
|
|
}
|