bundles/ntfy: update config to more recent version
This commit is contained in:
parent
2297f1dacf
commit
95d5c0cfc8
2 changed files with 104 additions and 39 deletions
|
@ -1,43 +1,55 @@
|
|||
ratelimit_exempt_hosts = set()
|
||||
|
||||
files = {
|
||||
'/etc/ntfy/server.yml': {
|
||||
'content_type': 'mako',
|
||||
'needs': {
|
||||
'pkg_apt:ntfy',
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:ntfy:restart',
|
||||
},
|
||||
for identifier in node.metadata.get('ntfy/ratelimit-exempt-hosts', set()):
|
||||
ips = repo.libs.tools.resolve_identifier(repo, identifier)
|
||||
ratelimit_exempt_hosts |= {str(ip) for ip in ips['ipv4']}
|
||||
ratelimit_exempt_hosts |= {str(ip) for ip in ips['ipv6']}
|
||||
|
||||
|
||||
files['/etc/ntfy/server.yml'] = {
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'ratelimit_exempt_hosts': ratelimit_exempt_hosts,
|
||||
},
|
||||
'after': {
|
||||
'pkg_apt:ntfy',
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:ntfy:restart',
|
||||
},
|
||||
}
|
||||
|
||||
directories = {
|
||||
'/opt/ntfy': {},
|
||||
'/var/lib/ntfy': {
|
||||
'owner': 'ntfy',
|
||||
'group': 'ntfy',
|
||||
},
|
||||
'/var/cache/ntfy': {
|
||||
'owner': 'ntfy',
|
||||
'group': 'ntfy',
|
||||
},
|
||||
'/var/opt/ntfy': {
|
||||
'owner': 'ntfy',
|
||||
'group': 'ntfy',
|
||||
directories['/var/lib/ntfy'] = {
|
||||
'owner': 'ntfy',
|
||||
'group': 'ntfy',
|
||||
'before': {
|
||||
'pkg_apt:ntfy',
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd = {
|
||||
'ntfy': {
|
||||
'needs': {
|
||||
'file:/etc/ntfy/server.yml',
|
||||
'pkg_apt:ntfy',
|
||||
},
|
||||
directories['/var/cache/ntfy'] = {
|
||||
'owner': 'ntfy',
|
||||
'group': 'ntfy',
|
||||
'before': {
|
||||
'pkg_apt:ntfy',
|
||||
},
|
||||
}
|
||||
|
||||
users = {
|
||||
'ntfy': {
|
||||
'home': '/opt/ntfy',
|
||||
directories['/var/opt/ntfy'] = {
|
||||
'owner': 'ntfy',
|
||||
'group': 'ntfy',
|
||||
'before': {
|
||||
'pkg_apt:ntfy',
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd['ntfy'] = {
|
||||
'needs': {
|
||||
'file:/etc/ntfy/server.yml',
|
||||
'pkg_apt:ntfy',
|
||||
},
|
||||
}
|
||||
|
||||
users['ntfy'] = {
|
||||
'home': '/var/lib/ntfy',
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue