Add network reload support

This commit is contained in:
Patrik Lundin 2024-10-11 19:04:17 +02:00
parent fe428a9e74
commit a82798ead5
Signed by: patlu
GPG key ID: A0A812BA2249F294

View file

@ -54,6 +54,11 @@ class cdn::cache(
mode => '0644',
content => template('cdn/cache/cdn-dummy.network.erb'),
}
# Reload the network config if it has changed
exec { "networkctl reload":
subscribe => File[/etc/systemd/network/cdn-dummy.network],
refreshonly => true,
}
$sysctl_file = '/etc/sysctl.d/99-cdn-cache.conf'
file { $sysctl_file: