Add address config for dummy interface

This commit is contained in:
Patrik Lundin 2024-10-11 18:52:53 +02:00
parent 1e8cad6ea0
commit 637e2ae307
Signed by: patlu
GPG key ID: A0A812BA2249F294
2 changed files with 19 additions and 0 deletions

View file

@ -47,6 +47,14 @@ class cdn::cache(
content => template('cdn/cache/cdn-dummy.netdev.erb'),
}
file { '/etc/systemd/network/cdn-dummy.network':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template('cdn/cache/cdn-dummy.network.erb'),
}
$sysctl_file = '/etc/sysctl.d/99-cdn-cache.conf'
file { $sysctl_file:
ensure => file,

View file

@ -0,0 +1,11 @@
[Match]
Name=dummy0
[Network]
<% @cache_secrets['customers'][@customer].each do |customer| -%>
# <%= @customer %>
Address=<%= $customer['ip4'] %>
Address=<%= $customer['ip6'] %>
<% end -%>