summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-11-06 16:11:43 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-11-06 21:43:20 +0100
commita5ed20b2aadc9359ca3add08cd7ddfdcab039f34 (patch)
tree3e27ab63ececf78f79b0e5a503992eb11218677f /manifests
parentAdd puppet notice to generated sytemd files. (diff)
downloadnetworking-a5ed20b2aadc9359ca3add08cd7ddfdcab039f34.tar.gz
networking-a5ed20b2aadc9359ca3add08cd7ddfdcab039f34.tar.xz
Allow for lists in unit files.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/networkd.pp1
-rw-r--r--manifests/networkd_instance.pp6
2 files changed, 4 insertions, 3 deletions
diff --git a/manifests/networkd.pp b/manifests/networkd.pp
index ca0f5a2..5b34a32 100644
--- a/manifests/networkd.pp
+++ b/manifests/networkd.pp
@@ -11,6 +11,7 @@ class networking::networkd (
}
}
+ # Why this instead of `networkctl reload`?
if $notify_ {
exec { 'reload networkd':
command => 'systemctl reload-or-restart systemd-networkd',
diff --git a/manifests/networkd_instance.pp b/manifests/networkd_instance.pp
index 4089e75..07465b6 100644
--- a/manifests/networkd_instance.pp
+++ b/manifests/networkd_instance.pp
@@ -1,5 +1,5 @@
define networking::networkd_instance (
- Hash[String,Hash] $content,
+ Hash[String,Variant[Hash,Array[Hash]]] $content,
Enum['present','absent'] $ensure = 'present',
String $path = $networking::networkd::path,
String $filename = $name,
@@ -14,8 +14,8 @@ define networking::networkd_instance (
file { $file:
ensure => $ensure,
content => epp('networking/unit_file.epp', {
- data => $content
+ data => networking::repack($content),
}),
- notify => if $networking::networkd::notify_ { Exec['reload networkd'] } else { [] },
+ notify => if $networking::networkd::notify_ { Exec['reload networkd'] } else { [] },
}
}