From 1cb56acc3aa0d82607452ff2cb265e056bbad6d3 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Tue, 19 Jan 2016 18:09:32 -0200 Subject: [PATCH] Enable NGINX to listen on ports 82-84 for Mezuro --- cookbooks/mezuro/recipes/kalibro_configurations.rb | 6 ++++++ cookbooks/mezuro/recipes/kalibro_processor.rb | 6 ++++++ cookbooks/mezuro/recipes/prezento.rb | 6 ++++++ 3 files changed, 18 insertions(+), 0 deletions(-) diff --git a/cookbooks/mezuro/recipes/kalibro_configurations.rb b/cookbooks/mezuro/recipes/kalibro_configurations.rb index 0a80718..80be42d 100644 --- a/cookbooks/mezuro/recipes/kalibro_configurations.rb +++ b/cookbooks/mezuro/recipes/kalibro_configurations.rb @@ -32,6 +32,12 @@ execute 'kalibro-configurations:migrate' do notifies :restart, 'service[kalibro-configurations.target]' end +execute 'kalibro-configurations:open_port' do + command 'semanage port -a -t http_port_t -p tcp 83' + user 'root' + only_if '! semanage port -l | grep "^\(http_port_t\)\(.\)\+\(\s83,\)"' +end + template '/etc/nginx/conf.d/kalibro-configurations.conf' do source 'kalibro_configurations/nginx.conf.erb' owner 'root' diff --git a/cookbooks/mezuro/recipes/kalibro_processor.rb b/cookbooks/mezuro/recipes/kalibro_processor.rb index 6848bd9..9a66058 100644 --- a/cookbooks/mezuro/recipes/kalibro_processor.rb +++ b/cookbooks/mezuro/recipes/kalibro_processor.rb @@ -31,6 +31,12 @@ execute 'kalibro-processor:migrate' do notifies :restart, 'service[kalibro-processor.target]' end +execute 'kalibro-processor:open_port' do + command 'semanage port -a -t http_port_t -p tcp 82' + user 'root' + only_if '! semanage port -l | grep "^\(http_port_t\)\(.\)\+\(\s82,\)"' +end + template '/etc/nginx/conf.d/kalibro-processor.conf' do source 'kalibro_processor/nginx.conf.erb' owner 'root' diff --git a/cookbooks/mezuro/recipes/prezento.rb b/cookbooks/mezuro/recipes/prezento.rb index 2faaa22..281d132 100644 --- a/cookbooks/mezuro/recipes/prezento.rb +++ b/cookbooks/mezuro/recipes/prezento.rb @@ -40,6 +40,12 @@ template PREZENTO_DIR + '/config/kalibro.yml' do notifies :restart, 'service[prezento.target]' end +execute 'prezento:open_port' do + command 'semanage port -a -t http_port_t -p tcp 84' + user 'root' + only_if '! semanage port -l | grep "^\(http_port_t\)\(.\)\+\(\s84,\)"' +end + template '/etc/nginx/conf.d/prezento.conf' do source 'prezento/nginx.conf.erb' owner 'root' -- libgit2 0.21.2