diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-06-23 18:35:51 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-06-23 18:35:51 +0200 |
commit | 638bae3658c40b494506bf953411e19e871492fe (patch) | |
tree | f057d3f9dff074e8a0dc1a42295d1260f1f3dd4b | |
parent | Fix types. (diff) | |
download | nspawn-638bae3658c40b494506bf953411e19e871492fe.tar.gz nspawn-638bae3658c40b494506bf953411e19e871492fe.tar.xz |
Config base.
Diffstat (limited to '')
-rw-r--r-- | manifests/machine.pp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/manifests/machine.pp b/manifests/machine.pp index f3361eb..a0eebc4 100644 --- a/manifests/machine.pp +++ b/manifests/machine.pp @@ -38,12 +38,21 @@ define nspawn::machine ( ) { $root = "${nspawn::machine_dir}/${name}" - $final_config = $merge ? { + $almost_final_config = $merge ? { 'deep' => deep_merge($nspawn::config, $config), 'shallow' => $nspawn::config + $config, 'override' => $config, } + # Empty base config ensuring that all sections are present. + $config_base = { + 'Exec' => {}, + 'Files' => {}, + 'Network' => {}, + } + + $final_config = $config_base + $almost_final_config + file { "${nspawn::nspawn_dir}/${name}.nspawn": ensure => $ensure, content => epp("${module_name}/systemd/nspawn.epp", { |