Skip to content

Commit

Permalink
(MODULES-1984) Perform daemon-reload on systemd
Browse files Browse the repository at this point in the history
This commit patches the `manifests/linux/redhat.pp` manifest to
perform a `systemctl daemon-reload` exec on platforms that also
contain firewalld.

Prior to this commit, Specifically on Centos 7, if the systemd
deamon is not reloaded then the iptables service fails to start
because it cannot see the systemd Unit for that service.

This patch refreshes the daemon's list of Units and allows the
service to start as expected.
  • Loading branch information
John Duarte committed Apr 28, 2015
1 parent e7121fe commit b7182ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions manifests/linux/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
}
}

if ($::operatingsystem != 'Amazon')
and (($::operatingsystem != 'Fedora' and versioncmp($::operatingsystemrelease, '7.0') >= 0)
or ($::operatingsystem == 'Fedora' and versioncmp($::operatingsystemrelease, '15') >= 0)) {
exec { '/usr/bin/systemctl daemon-reload':
require => Package[$package_name],
}
}

service { $service_name:
ensure => $ensure,
enable => $enable,
Expand Down

0 comments on commit b7182ea

Please sign in to comment.