Skip to content

Commit

Permalink
manage systemd-networkd in init.pp
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jul 13, 2017
1 parent ece0238 commit fe6c1c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 8 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -21,4 +22,10 @@

create_resources('systemd::service_limits', $service_limits, {})

if $manage_networkd {
service{'systemd-networkd':
ensure => 'running',
enable => true,
}
}
}
8 changes: 0 additions & 8 deletions manifests/network.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fe6c1c2

Please sign in to comment.