defaults = { 'apt': { 'packages': { 'gunicorn': {}, 'python3-gevent': {}, 'python3-flask': {}, 'python3-redis': {}, 'python3-virtualenv': {}, 'python3-requests': {}, 'python3-iso8601': {}, }, }, 'infobeamer-cms': { 'config': { 'GITHUB_CLIENT_ID': 'encrypted1', 'GITHUB_CLIENT_SECRET': 'encryted2', 'SESSION_COOKIE_NAME': '__Host-sess', 'PREFERRED_URL_SCHEME': 'https', 'HOSTED_API_KEY': 'encrypted3', 'MAX_UPLOADS': 5, 'SETUP_IDS': '[123456]', 'URL_KEY': 'encrypted4', 'PUSHOVER_TARGET': 'encrypted5', 'PUSHOVER_APP_KEY': 'encrypted6', 'TIME_MIN': 1640039559, 'TIME_MAX': 1640905200, 'VERSION': 1, 'ROOMS': [ { 'name': 'Ada', 'device_id': 5919, 'interrupts': [ { 'name': 'Signal', 'data': 'signal', }, ], }, { 'name': 'Borg', 'device_id': 5920, 'interrupts': [ { 'name': 'Signal', 'data': 'signal', }, ], }, ], 'unused': 'foobar', }, }, } @metadata_reactor.provides( 'nginx/vhosts', ) def nginx(metadata): if not node.has_bundle('nginx'): raise DoNotRunAgain locations = { '/': { 'target': 'http://127.0.0.1:8000', }, '/twitter/': { 'alias': '/export/twitter/', }, '/static/': { 'alias': '/opt/infobeamer-cms/static', }, } vhosts = { 'infobeamer-cms': { 'locations': locations, 'website_check_path': '/', 'website_check_string': '', }, } return { 'nginx': { 'vhosts': vhosts }, }