]> git.openstreetmap.org Git - chef.git/commitdiff
Create shorewall config files before trying to start it
authorTom Hughes <tom@compton.nu>
Mon, 16 May 2016 13:38:00 +0000 (14:38 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 16 May 2016 13:38:00 +0000 (14:38 +0100)
cookbooks/networking/recipes/default.rb

index 485f852a6eb980cf24fd0bc3212672e1c59780ee..1774b637be007cfee1ee8100eb91f3a6ea677b95 100644 (file)
@@ -131,12 +131,6 @@ end
 
 package "shorewall"
 
 
 package "shorewall"
 
-service "shorewall" do
-  action [:enable, :start]
-  supports :restart => true
-  status_command "shorewall status"
-end
-
 template "/etc/default/shorewall" do
   source "shorewall-default.erb"
   owner "root"
 template "/etc/default/shorewall" do
   source "shorewall-default.erb"
   owner "root"
@@ -196,6 +190,12 @@ template "/etc/shorewall/rules" do
   notifies :restart, "service[shorewall]"
 end
 
   notifies :restart, "service[shorewall]"
 end
 
+service "shorewall" do
+  action [:enable, :start]
+  supports :restart => true
+  status_command "shorewall status"
+end
+
 template "/etc/logrotate.d/shorewall" do
   source "logrotate.shorewall.erb"
   owner "root"
 template "/etc/logrotate.d/shorewall" do
   source "logrotate.shorewall.erb"
   owner "root"
@@ -244,12 +244,6 @@ end
 unless node.interfaces(:family => :inet6).empty?
   package "shorewall6"
 
 unless node.interfaces(:family => :inet6).empty?
   package "shorewall6"
 
-  service "shorewall6" do
-    action [:enable, :start]
-    supports :restart => true
-    status_command "shorewall6 status"
-  end
-
   template "/etc/default/shorewall6" do
     source "shorewall-default.erb"
     owner "root"
   template "/etc/default/shorewall6" do
     source "shorewall-default.erb"
     owner "root"
@@ -309,6 +303,12 @@ unless node.interfaces(:family => :inet6).empty?
     notifies :restart, "service[shorewall6]"
   end
 
     notifies :restart, "service[shorewall6]"
   end
 
+  service "shorewall6" do
+    action [:enable, :start]
+    supports :restart => true
+    status_command "shorewall6 status"
+  end
+
   template "/etc/logrotate.d/shorewall6" do
     source "logrotate.shorewall.erb"
     owner "root"
   template "/etc/logrotate.d/shorewall6" do
     source "logrotate.shorewall.erb"
     owner "root"