}
end
- search(:node, "roles:mail") do |server|
+ search(:node, "roles:mail OR roles:prometheus") do |server|
allowed_ips = server.interfaces(:role => :internal).map do |interface|
"#{interface[:network]}/#{interface[:prefix]}"
end
owner "root"
group "root"
mode "644"
- not_if { ENV["TEST_KITCHEN"] }
+ not_if { kitchen? }
end
service "systemd-resolved" do
package "shorewall"
+systemd_service "shorewall-docker" do
+ service "shorewall"
+ dropin "docker"
+ exec_stop "/sbin/shorewall $OPTIONS stop"
+ notifies :restart, "service[shorewall]"
+end
+
template "/etc/default/shorewall" do
source "shorewall-default.erb"
owner "root"
notifies :restart, "service[shorewall]"
end
+template "/etc/shorewall/stoppedrules" do
+ source "shorewall-stoppedrules.erb"
+ owner "root"
+ group "root"
+ mode "644"
+ notifies :restart, "service[shorewall]"
+end
+
if node[:networking][:firewall][:enabled]
service "shorewall" do
action [:enable, :start]