Move the firewall rule for sockethub to its own recipe
This commit is contained in:
parent
39744f517f
commit
e0aa4c5b11
18
site-cookbooks/sockethub/recipes/_firewall.rb
Normal file
18
site-cookbooks/sockethub/recipes/_firewall.rb
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#
|
||||||
|
# Cookbook Name:: sockethub
|
||||||
|
# Recipe:: _firewall
|
||||||
|
#
|
||||||
|
# Copyright 2015-2019, Kosmos
|
||||||
|
#
|
||||||
|
# All rights reserved - Do Not Redistribute
|
||||||
|
#
|
||||||
|
|
||||||
|
unless node.chef_environment == "development"
|
||||||
|
include_recipe "firewall"
|
||||||
|
firewall_rule 'sockethub' do
|
||||||
|
port node['sockethub']['external_port'].to_i
|
||||||
|
protocol :tcp
|
||||||
|
command :allow
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -7,15 +7,7 @@
|
|||||||
# All rights reserved - Do Not Redistribute
|
# All rights reserved - Do Not Redistribute
|
||||||
#
|
#
|
||||||
|
|
||||||
unless node.chef_environment == "development"
|
include_recipe 'sockethub::_firewall'
|
||||||
include_recipe "firewall"
|
|
||||||
firewall_rule 'sockethub' do
|
|
||||||
port node['sockethub']['external_port'].to_i
|
|
||||||
protocol :tcp
|
|
||||||
command :allow
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
include_recipe 'kosmos-nginx'
|
include_recipe 'kosmos-nginx'
|
||||||
server_name = node['sockethub']['nginx']['server_name']
|
server_name = node['sockethub']['nginx']['server_name']
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user