From b7182ea74cd4dd630d907d54d052a71639594246 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Tue, 28 Apr 2015 13:07:31 -0700 Subject: [PATCH] (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. --- manifests/linux/redhat.pp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manifests/linux/redhat.pp b/manifests/linux/redhat.pp index 21e509267..9a33abbd3 100644 --- a/manifests/linux/redhat.pp +++ b/manifests/linux/redhat.pp @@ -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,