summaryrefslogtreecommitdiff
path: root/manifests/os
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/os')
-rw-r--r--manifests/os/arch.pp43
-rw-r--r--manifests/os/debian.pp6
2 files changed, 12 insertions, 37 deletions
diff --git a/manifests/os/arch.pp b/manifests/os/arch.pp
index 4f83546..5fbf5d1 100644
--- a/manifests/os/arch.pp
+++ b/manifests/os/arch.pp
@@ -8,7 +8,7 @@ define nspawn::os::arch (
creates => "/var/lib/machines/${machine}/etc/os-release",
}
- file { "/var/lib/machines/${machine}/etc/systemd/network.d/20-puppet.conf":
+ file { "/var/lib/machines/${machine}/etc/systemd/network/20-puppet.conf":
content => @(EOF)
[Match]
Name=host0
@@ -20,39 +20,14 @@ define nspawn::os::arch (
| EOF
}
- $symlinks = [
- [ '/etc/systemd/system/dbus-org.freedesktop.network1.service',
- '/usr/lib/systemd/system/systemd-networkd.service' ],
- [ '/etc/systemd/system/multi-user.target.wants/systemd-networkd.service',
- '/usr/lib/systemd/system/systemd-networkd.service' ],
- [ '/etc/systemd/system/sockets.target.wants/systemd-networkd.socket',
- '/usr/lib/systemd/system/systemd-networkd.socket' ],
- [ '/etc/systemd/system/sysinit.target.wants/systemd-network-generator.service',
- '/usr/lib/systemd/system/systemd-network-generator.service' ],
- [ '/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service',
- '/usr/lib/systemd/system/systemd-networkd-wait-online.service' ],
- ]
-
- $symlinks.each |$pair| {
- $where = $pair[0]
- $target = $pair[1]
- file { "/var/lib/machines/${machine}/${where}":
- ensure => link,
- target => $target,
- }
- }
-
-
- file { "/var/lib/machines/${machine}/etc/systemd/network.d/20-puppet.conf":
- content => @(EOF)
- [Match]
- Name=host0
-
- [Network]
- Address=10.0.0.43/23
- Gateway=10.0.0.1
- IPv6AcceptRA=1
- | EOF
+ exec { "Enable systemd-networkd on ${machine}":
+ command => [ '/usr/bin/systemd-nspawn',
+ '-M', $machine,
+ '--quiet',
+ 'systemctl', 'enable', 'systemd-networkd',
+ ],
+ # among others
+ creates => "/var/lib/machines/${machine}/etc/systemd/system/multi-user.target.wants/systemd-networkd.service",
}
}
diff --git a/manifests/os/debian.pp b/manifests/os/debian.pp
index c821ba6..13d9ac9 100644
--- a/manifests/os/debian.pp
+++ b/manifests/os/debian.pp
@@ -29,11 +29,11 @@ define nspawn::os::debian (
# allow-hotplug host0
iface host0 inet static
- address 10.0.0.42/23
- gateway 10.0.0.1
+ address 10.0.0.42/23
+ gateway 10.0.0.1
iface host0 inet6 auto
- private 0
+ private 0
| EOF
}