diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-11-06 16:11:43 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-11-06 21:43:20 +0100 |
commit | a5ed20b2aadc9359ca3add08cd7ddfdcab039f34 (patch) | |
tree | 3e27ab63ececf78f79b0e5a503992eb11218677f /functions | |
parent | Add puppet notice to generated sytemd files. (diff) | |
download | networking-a5ed20b2aadc9359ca3add08cd7ddfdcab039f34.tar.gz networking-a5ed20b2aadc9359ca3add08cd7ddfdcab039f34.tar.xz |
Allow for lists in unit files.
Diffstat (limited to 'functions')
-rw-r--r-- | functions/repack.pp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/functions/repack.pp b/functions/repack.pp new file mode 100644 index 0000000..396354c --- /dev/null +++ b/functions/repack.pp @@ -0,0 +1,7 @@ +# Normalizes a hash or a list of hashes to a list of hashes +function networking::repack(Variant[Hash, Array[Hash]] $data) >> Array[Hash] { + $data ? { + Hash => [$data], + _ => $data, + } +} |