Browse Source

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
changes/39/151039/1
Matthew Wagoner 6 years ago
parent
commit
f61a443a90
1 changed files with 22 additions and 25 deletions
  1. 22
    25
      manifests/init.pp

+ 22
- 25
manifests/init.pp View File

@@ -1,20 +1,20 @@
1 1
 #http://projects.puppetlabs.com/projects/1/wiki/Module_Iptables_Patterns
2 2
 
3 3
 class iptables($rules='', $public_tcp_ports=[], $public_udp_ports=[]) {
4
-  package {
5
-    "iptables-persistent": ensure => present;
4
+  package { 'iptables-persistent':
5
+    ensure => present,
6 6
   }
7 7
 
8
-  service { "iptables-persistent":
9
-    require => Package["iptables-persistent"],
8
+  service { 'iptables-persistent':
9
+    require => Package['iptables-persistent'],
10 10
 
11 11
     # Because there is no running process for this service, the normal status
12 12
     # checks fail.  Because puppet then thinks the service has been manually
13 13
     # stopped, it won't restart it.  This fake status command will trick puppet
14 14
     # into thinking the service is *always* running (which in a way it is, as
15 15
     # iptables is part of the kernel.)
16
-    hasstatus => true,
17
-    status => "true",
16
+    hasstatus  => true,
17
+    status     => true,
18 18
 
19 19
     # Under Debian, the "restart" parameter does not reload the rules, so tell
20 20
     # Puppet to fall back to stop/start, which does work.
@@ -22,32 +22,29 @@ class iptables($rules='', $public_tcp_ports=[], $public_udp_ports=[]) {
22 22
 
23 23
   }
24 24
 
25
-  file { "/etc/iptables":
26
-      ensure => directory
25
+  file { '/etc/iptables':
26
+      ensure => directory,
27 27
   }
28 28
 
29
-  file {
30
-    "/etc/iptables/rules":
31
-      owner   => "root",
32
-      group   => "root",
33
-      mode    => 640,
29
+  file { '/etc/iptables/rules':
30
+      owner   => 'root',
31
+      group   => 'root',
32
+      mode    => '0640',
34 33
       content => template('iptables/rules.erb'),
35
-      require => [Package["iptables-persistent"], File["/etc/iptables"]],
34
+      require => [Package['iptables-persistent'], File['/etc/iptables']],
36 35
 
37 36
       # When this file is updated, make sure the rules get reloaded.
38
-      notify  => Service["iptables-persistent"],
39
-      ;
37
+      notify  => Service['iptables-persistent'],
40 38
   }
41 39
 
42
-  file {
43
-    "/etc/iptables/rules.v4":
44
-      owner => "root",
45
-      group => "root",
46
-      mode => 640,
47
-      ensure => link,
48
-      target => "/etc/iptables/rules",
49
-      require => File["/etc/iptables/rules"],
50
-      notify => Service["iptables-persistent"]
40
+  file { '/etc/iptables/rules.v4':
41
+      ensure  => link,
42
+      owner   => 'root',
43
+      group   => 'root',
44
+      mode    => '0640',
45
+      target  => '/etc/iptables/rules',
46
+      require => File['/etc/iptables/rules'],
47
+      notify  => Service['iptables-persistent'],
51 48
   }
52 49
 
53 50
 }

Loading…
Cancel
Save