Combine networkctl reload command

This commit is contained in:
Patrik Lundin 2024-10-11 22:10:50 +02:00
parent d289ffa656
commit ca7fbbe945
Signed by: patlu
GPG key ID: A0A812BA2249F294

View file

@ -54,11 +54,6 @@ class cdn::cache(
mode => '0644', mode => '0644',
content => template('cdn/cache/10-cdn-dummy.network.erb'), content => template('cdn/cache/10-cdn-dummy.network.erb'),
} }
# Reload the network config if it has changed
exec { 'networkctl reload':
subscribe => File['/etc/systemd/network/10-cdn-dummy.network'],
refreshonly => true,
}
file { '/etc/systemd/network/10-cdn-ipip.netdev': file { '/etc/systemd/network/10-cdn-ipip.netdev':
ensure => file, ensure => file,
@ -75,9 +70,10 @@ class cdn::cache(
mode => '0644', mode => '0644',
content => template('cdn/cache/10-cdn-ipip.network.erb'), content => template('cdn/cache/10-cdn-ipip.network.erb'),
} }
# Reload the network config if it has changed # Reload the network config if it has changed
exec { 'networkctl reload': exec { 'networkctl reload':
subscribe => File['/etc/systemd/network/10-cdn-ipip.network'], subscribe => File['/etc/systemd/network/10-cdn-dummy.network'], File['/etc/systemd/network/10-cdn-ipip.network']],
refreshonly => true, refreshonly => true,
} }