Ensure iptables service is running
On Ubuntu, the iptables service starts running when it is installed. On CentOS, that's not the case, and signaling a restart in puppet does not actually start the service. The result is that while the iptables service is stopped, `iptables -S` is empty. This patch adds ensure => running to the service resources so that iptables behaves the same on CentOS and Ubuntu. Change-Id: I0584c988bcebeee5133f85d55f8d389d78ebac70
This commit is contained in:
@@ -86,6 +86,7 @@ class iptables(
|
||||
status => $::iptables::params::service_status_cmd,
|
||||
hasrestart => $::iptables::params::service_has_restart,
|
||||
enable => true,
|
||||
ensure => running,
|
||||
}
|
||||
|
||||
if ($::osfamily == 'RedHat') {
|
||||
@@ -98,6 +99,7 @@ class iptables(
|
||||
status => $::iptables::params::service_status_cmd,
|
||||
hasrestart => $::iptables::params::service_has_restart,
|
||||
enable => true,
|
||||
ensure => running,
|
||||
subscribe => File["${::iptables::params::rules_dir}/rules"],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user