style edits to puppet config files
Change-Id: I4f7314bcb1cb58f94ff7a78aebe27ec4591fc11c Reviewed-on: https://review.openstack.org/14187 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
fa51e50883
commit
f61a443a90
|
@ -1,20 +1,20 @@
|
|||
#http://projects.puppetlabs.com/projects/1/wiki/Module_Iptables_Patterns
|
||||
|
||||
class iptables($rules='', $public_tcp_ports=[], $public_udp_ports=[]) {
|
||||
package {
|
||||
"iptables-persistent": ensure => present;
|
||||
package { 'iptables-persistent':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
service { "iptables-persistent":
|
||||
require => Package["iptables-persistent"],
|
||||
service { 'iptables-persistent':
|
||||
require => Package['iptables-persistent'],
|
||||
|
||||
# Because there is no running process for this service, the normal status
|
||||
# checks fail. Because puppet then thinks the service has been manually
|
||||
# stopped, it won't restart it. This fake status command will trick puppet
|
||||
# into thinking the service is *always* running (which in a way it is, as
|
||||
# iptables is part of the kernel.)
|
||||
hasstatus => true,
|
||||
status => "true",
|
||||
hasstatus => true,
|
||||
status => true,
|
||||
|
||||
# Under Debian, the "restart" parameter does not reload the rules, so tell
|
||||
# Puppet to fall back to stop/start, which does work.
|
||||
|
@ -22,32 +22,29 @@ class iptables($rules='', $public_tcp_ports=[], $public_udp_ports=[]) {
|
|||
|
||||
}
|
||||
|
||||
file { "/etc/iptables":
|
||||
ensure => directory
|
||||
file { '/etc/iptables':
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
file {
|
||||
"/etc/iptables/rules":
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 640,
|
||||
file { '/etc/iptables/rules':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0640',
|
||||
content => template('iptables/rules.erb'),
|
||||
require => [Package["iptables-persistent"], File["/etc/iptables"]],
|
||||
require => [Package['iptables-persistent'], File['/etc/iptables']],
|
||||
|
||||
# When this file is updated, make sure the rules get reloaded.
|
||||
notify => Service["iptables-persistent"],
|
||||
;
|
||||
notify => Service['iptables-persistent'],
|
||||
}
|
||||
|
||||
file {
|
||||
"/etc/iptables/rules.v4":
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 640,
|
||||
ensure => link,
|
||||
target => "/etc/iptables/rules",
|
||||
require => File["/etc/iptables/rules"],
|
||||
notify => Service["iptables-persistent"]
|
||||
file { '/etc/iptables/rules.v4':
|
||||
ensure => link,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0640',
|
||||
target => '/etc/iptables/rules',
|
||||
require => File['/etc/iptables/rules'],
|
||||
notify => Service['iptables-persistent'],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue