diff options
Diffstat (limited to 'manifests/util/enable_networkd.pp')
-rw-r--r-- | manifests/util/enable_networkd.pp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/manifests/util/enable_networkd.pp b/manifests/util/enable_networkd.pp deleted file mode 100644 index 40cb3d9..0000000 --- a/manifests/util/enable_networkd.pp +++ /dev/null @@ -1,39 +0,0 @@ -define nspawn::util::enable_networkd ( - String $template_name = $name, - String $template_dir = $nspawn::template_dir, - String $root = "${template_dir}/${template_name}", -) { - - networking::networkd_instance { "Initial networking on ${template_name}": - priority => 99, - filename => 'puppet-initial', - path => "${root}/${networking::networkd::path}", - content => { - 'Match' => { - 'Name' => 'host0', - }, - 'Network' => { - 'DHCP' => 'ipv4', - 'IPv6AcceptRA' => 1, - }, - }, - } - - $running = $facts['machined-info'][$template_name] != undef - and $facts['machined-info'][$template_name]['State'] == 'running' - - $cmd = if $running { - [ 'systemctl', '-M', $template_name, 'enable', 'systemd-networkd' ] - } else { - [ 'systemd-nspawn', '-M', $template_name, '--quiet', - 'systemctl', 'enable', 'systemd-networkd' ] - } - - exec { "Enable systemd-networkd on ${template_name}": - command => $cmd, - path => [ '/bin', '/usr/bin', ], - # among others - creates => "${root}/etc/systemd/system/multi-user.target.wants/systemd-networkd.service", - } - -} |