From: Jonathan Tripathy Date: Tue, 5 May 2015 15:52:55 +0000 (+0100) Subject: Fixed idempotency bug relating to MODULES-1984 X-Git-Tag: 1.6.0~15^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4f7e5679368de9fd6f309539ad6d3a70e09687bf;p=puppet-modules%2Fpuppetlabs-firewall.git Fixed idempotency bug relating to MODULES-1984 --- diff --git a/manifests/linux/redhat.pp b/manifests/linux/redhat.pp index 9a33abb..36571bb 100644 --- a/manifests/linux/redhat.pp +++ b/manifests/linux/redhat.pp @@ -42,8 +42,12 @@ 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], + if $ensure == 'running' { + exec { '/usr/bin/systemctl daemon-reload': + require => Package[$package_name], + before => Service[$service_name], + unless => '/usr/bin/systemctl is-active iptables' + } } }