From f23383807ffccade34a818a6117685921070f6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Fri, 24 Oct 2014 09:37:01 +0200 Subject: [PATCH] Fixed firewalld package issue Firewalld package cannot be uninstalled, because other packages might be dependent on it. This patch makes just firewalld service to stop and be disabled. For more info please check: https://bugzilla.redhat.com/show_bug.cgi?id=1148399 --- firewall/manifests/linux/redhat.pp | 7 ++++--- firewall/spec/unit/classes/firewall_linux_redhat_spec.rb | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/firewall/manifests/linux/redhat.pp b/firewall/manifests/linux/redhat.pp index b7a4d0e3f..c808c7e43 100644 --- a/firewall/manifests/linux/redhat.pp +++ b/firewall/manifests/linux/redhat.pp @@ -22,9 +22,10 @@ # lib/puppet/util/firewall.rb. if ($::operatingsystem != 'Fedora' and versioncmp($::operatingsystemrelease, '7.0') >= 0) or ($::operatingsystem == 'Fedora' and versioncmp($::operatingsystemrelease, '15') >= 0) { - package { 'firewalld': - ensure => absent, - before => Package['iptables-services'], + service { "firewalld": + ensure => stopped, + enable => false, + before => Package['iptables-services'] } package { 'iptables-services': diff --git a/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb b/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb index 43263fa67..9ffab4444 100644 --- a/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb +++ b/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb @@ -12,7 +12,7 @@ :operatingsystemrelease => osrel }} - it { should_not contain_package('firewalld') } + it { should_not contain_service('firewalld') } it { should_not contain_package('iptables-services') } end end @@ -24,8 +24,9 @@ :operatingsystemrelease => osrel }} - it { should contain_package('firewalld').with( - :ensure => 'absent', + it { should contain_service('firewalld').with( + :ensure => 'stopped', + :enable => false, :before => 'Package[iptables-services]' )}