From: John Duarte Date: Tue, 28 Apr 2015 20:07:31 +0000 (-0700) Subject: (MODULES-1984) Perform daemon-reload on systemd X-Git-Tag: 1.6.0~16^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b7182ea74cd4dd630d907d54d052a71639594246;p=puppet-modules%2Fpuppetlabs-firewall.git (MODULES-1984) Perform daemon-reload on systemd 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. --- diff --git a/manifests/linux/redhat.pp b/manifests/linux/redhat.pp index 21e5092..9a33abb 100644 --- a/manifests/linux/redhat.pp +++ b/manifests/linux/redhat.pp @@ -39,6 +39,14 @@ class firewall::linux::redhat ( } } + 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,