defaults = { 'apt': { 'packages': { 'imagemagick-6.q16': {}, }, }, 'php': { 'version': '8.0', 'packages': { 'apcu', 'bcmath', 'bz2', 'curl', 'gd', 'gmp', 'imagick', 'intl', 'ldap', 'mbstring', 'memcached', 'pgsql', 'redis', 'xml', 'zip', }, 'memory_limit': 512, 'post_max_size': 500, 'clear_env': False, }, 'postgresql': { 'version': '13', 'roles': { 'nextcloud': { 'password': repo.vault.password_for(f'{node.name} postgresql nextcloud'), }, }, 'databases': { 'nextcloud': { 'owner': 'nextcloud', }, }, }, } @metadata_reactor.provides( 'nginx/vhosts/nextcloud', ) def nginx(metadata): if not node.has_bundle('nginx'): raise DoNotRunAgain return { 'nginx': { 'vhosts': { 'nextcloud': { 'domain': metadata.get('nextcloud/domain'), 'webroot_config': { 'owner': 'www-data', 'group': 'www-data', }, 'max_body_size': '500M', 'extras': True, #'website_check_path': '/user/login', #'website_check_string': 'Sign In', }, }, }, } @metadata_reactor.provides( 'icinga2_api/nextcloud/services', ) def icinga_check_for_new_release(metadata): return { 'icinga2_api': { 'nextcloud': { 'services': { 'NEXTCLOUD UPDATE': { 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_github_for_new_release nextcloud/server {}'.format(metadata.get('nextcloud/version')), 'vars.notification.mail': True, 'check_interval': '60m', }, }, }, }, }