unsymlink_bundles #2

Merged
stillbeben merged 14 commits from unsymlink_bundles into main 2021-12-21 16:51:44 +00:00
2 changed files with 9 additions and 41 deletions
Showing only changes of commit 927a8f2e0c - Show all commits

View file

@ -1,11 +1,10 @@
from datetime import datetime, timedelta
if node.has_bundle('pacman'):
package = 'pkg_pacman:nginx'
username = 'http'
else:
package = 'pkg_apt:nginx'
username = 'www-data'
pkg_apt = {
'nginx': {
'needs': ['file:/etc/apt/sources.list.d/nginx.list'],
},
}
directories = {
'/etc/nginx/sites': {
@ -24,9 +23,9 @@ directories = {
},
},
'/var/log/nginx-timing': {
'owner': username,
'owner': 'http',
'needs': {
package,
'pkg_apt:nginx',
},
},
'/var/www': {},
@ -39,7 +38,7 @@ files = {
'/etc/nginx/nginx.conf': {
'content_type': 'mako',
'context': {
'username': username,
'username': 'http',
**node.metadata['nginx'],
},
'triggers': {
@ -89,7 +88,7 @@ svc_systemd = {
'needs': {
'action:nginx-generate-dhparam',
'directory:/var/log/nginx-timing',
package,
'pkg_apt:nginx',
},
},
}

View file

@ -9,46 +9,15 @@ defaults = {
},
},
},
'packages': {
'nginx': {},
},
},
'backups': {
'paths': {
'/var/www',
},
},
'icinga2_api': {
'nginx': {
'services': {
'NGINX PROCESS': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_systemd_unit nginx',
},
'NGINX STATUS': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_nginx_status',
},
},
},
},
'nginx': {
'worker_connections': 768,
},
'pacman': {
'packages': {
'nginx': {},
},
},
}
if node.has_bundle('telegraf'):
defaults['telegraf'] = {
'input_plugins': {
'builtin': {
'nginx': [{
'urls': ['http://localhost:22999/server_status'],
}],
},
},
}