bundles/unbound: introduce, add to nodes
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
c5e43188ca
commit
3eeb253e55
7 changed files with 141 additions and 13 deletions
44
bundles/unbound/items.py
Normal file
44
bundles/unbound/items.py
Normal file
|
@ -0,0 +1,44 @@
|
|||
files = {
|
||||
'/etc/unbound/unbound.conf': {
|
||||
'content_type': 'mako',
|
||||
'context': node.metadata['unbound'],
|
||||
'triggers': {
|
||||
'svc_systemd:unbound:restart',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
actions = {
|
||||
'unbound_generate_certificates': {
|
||||
'command': 'unbound-control-setup',
|
||||
'unless': 'test -f /etc/unbound/unbound_server.key',
|
||||
'needs': {
|
||||
'pkg_apt:unbound',
|
||||
'pkg_apt:unbound-anchor',
|
||||
},
|
||||
},
|
||||
'unbound_download_root_hints': {
|
||||
'command': 'wget -O/etc/unbound/root-hints.txt https://www.internic.net/domain/named.root',
|
||||
'unless': 'test -f /etc/unbound/root-hints.txt',
|
||||
'needs': {
|
||||
'pkg_apt:unbound',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd = {
|
||||
'unbound': {
|
||||
'needs': {
|
||||
'action:unbound_generate_certificates',
|
||||
'action:unbound_download_root_hints',
|
||||
'file:/etc/unbound/unbound.conf',
|
||||
'pkg_apt:unbound',
|
||||
'pkg_apt:unbound-anchor',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if node.has_bundle('systemd-networkd'):
|
||||
svc_systemd['unbound']['needed_by'] = {
|
||||
'file:/etc/resolv.conf',
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue