diff --git a/manifests/init.pp b/manifests/init.pp index b65b2e44..e1bd80fa 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,7 +1,8 @@ # -- Class systemd # This module allows triggering systemd commands once for all modules class systemd ( - $service_limits = {} + $service_limits = {}, + Boolean $manage_networkd = true, ){ Exec { @@ -21,4 +22,10 @@ create_resources('systemd::service_limits', $service_limits, {}) + if $manage_networkd { + service{'systemd-networkd': + ensure => 'running', + enable => true, + } + } } diff --git a/manifests/network.pp b/manifests/network.pp index 00b5705f..4549e94c 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -7,18 +7,10 @@ Optional[String] $source = undef, Optional[Stdlib::Absolutepath] $target = undef, Boolean $restart_service = true, - Boolean $manage_service = true, ){ include ::systemd - if $manage_service { - service{'systemd-networkd': - ensure => 'running', - enabled => true, - } - } - if $restart_service { $notify = Service['systemd-networkd'] } else {