diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-27 07:04:40 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-27 07:04:40 +0200 |
commit | 177cb57f4fc06ebaecace262d3dbd1e417f5cce0 (patch) | |
tree | 4e52839140e1cde57682530720f60a88f1b0a235 /manifests | |
parent | Clarify choice of reload method. (diff) | |
download | networking-177cb57f4fc06ebaecace262d3dbd1e417f5cce0.tar.gz networking-177cb57f4fc06ebaecace262d3dbd1e417f5cce0.tar.xz |
Convert to PDK, and fix easy linter errors.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 3 | ||||
-rw-r--r-- | manifests/networkd_instance.pp | 31 |
2 files changed, 16 insertions, 18 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 7dc2450..790c8c0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,12 +2,11 @@ class networking ( Optional[Enum['systemd']] $provider = undef, Hash[String,Hash] $items = {}, ) { - # TODO choose a sensible provider here case $provider { 'systemd', undef: { - include ::networking::networkd + include networking::networkd create_resources(networking::networkd_instance, $items) } default: { diff --git a/manifests/networkd_instance.pp b/manifests/networkd_instance.pp index 8a2693d..cbad0a2 100644 --- a/manifests/networkd_instance.pp +++ b/manifests/networkd_instance.pp @@ -9,27 +9,26 @@ define networking::networkd_instance ( String $file = "${path}/${real_filename}", Optional[String] $mode = undef, ) { - file { $file: ensure => $ensure, owner => 'systemd-network', mode => $mode, content => epp('networking/unit_file.epp', { - # Keys are unit file sections - # Values are list of section content, so - # { - # 'Section' => [ - # { - # 'key': 'value', - # 'mvalued': ['v1', 'v2'], - # } - # ] - # } - # [Section] - # key=value - # mvalued=v1 - # mvalued=v2 - data => networking::repack($content), + # Keys are unit file sections + # Values are list of section content, so + # { + # 'Section' => [ + # { + # 'key': 'value', + # 'mvalued': ['v1', 'v2'], + # } + # ] + # } + # [Section] + # key=value + # mvalued=v1 + # mvalued=v2 + data => networking::repack($content), }), notify => if $networking::networkd::notify_ { Exec['reload networkd'] } else { [] }, } |