diff --git a/bundles/unbound/metadata.py b/bundles/unbound/metadata.py index f8724c4..b08df0b 100644 --- a/bundles/unbound/metadata.py +++ b/bundles/unbound/metadata.py @@ -7,19 +7,24 @@ defaults = { 'unbound-anchor': {}, }, }, - 'cron': { - 'jobs': { - 'unbound_refresh_root-hints': '{} {} * * {} root wget -q -O/etc/unbound/root-hints.txt https://www.internic.net/domain/named.root'.format( - node.magic_number%60, - node.magic_number%24, - node.magic_number%7, - ), - 'unbound-auto-restart': '* * * * * root /usr/local/sbin/unbound-auto-restart', - }, - }, 'nameservers': { '127.0.0.1', }, + 'systemd-timers': { + 'timers': { + 'unbound-refresh-root-hints': { + 'command': 'wget -q -O/etc/unbound/root-hints.txt https://www.internic.net/domain/named.root', + 'when': '{}:{}:00'.format( + node.magic_number % 24, + node.magic_number % 60, + ), + }, + 'unbound-auto-restart': { + 'command': '/usr/local/sbin/unbound-auto-restart', + 'when': 'minutely', + }, + }, + }, 'unbound': { 'max_ttl': 3600, 'cache_size': '512M',