From a5ed20b2aadc9359ca3add08cd7ddfdcab039f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 6 Nov 2022 16:11:43 +0100 Subject: Allow for lists in unit files. --- manifests/networkd.pp | 1 + manifests/networkd_instance.pp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'manifests') 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 { [] }, } } -- cgit v1.2.3