From ad61a310bd2c309029043bf500f8eb783c32ec14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 18 Jan 2022 17:31:54 +0100 Subject: Nspawned machine setup. --- manifests/common.pp | 4 ++++ manifests/nspawned.pp | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 manifests/nspawned.pp diff --git a/manifests/common.pp b/manifests/common.pp index 27416bd..b7adb76 100644 --- a/manifests/common.pp +++ b/manifests/common.pp @@ -49,4 +49,8 @@ class profiles::common ( source => 'puppet:///modules/profiles/terminal-name.sh', } + if $facts['virtual'] == 'systemd_nspawn' { + include ::profiles::nspawned + } + } diff --git a/manifests/nspawned.pp b/manifests/nspawned.pp new file mode 100644 index 0000000..47345e0 --- /dev/null +++ b/manifests/nspawned.pp @@ -0,0 +1,20 @@ +# For machines managed through systemd-nspawn +class profiles::nspawned { + case $facts['os']['family'] { + 'Debian': { + ensure_packages(['dbus', 'systemd-container']) + } + 'Arch': { + # Technicly pulled in through base -> systemd -> dbus, but this + # is explicit. + ensure_packages(['dbus']) + } + default: { + } + } + + service { 'dbus.socket': + ensure => running, + } + +} -- cgit v1.2.3