Commit 739058a7 authored by Matthieu Vachon's avatar Matthieu Vachon

Added possibility to install nginx manually

parent eadfec5e
......@@ -169,7 +169,8 @@ default['postfix']['smtp_use_tls'] = "no"
default['gitlab']['unicorn_workers_number'] = 2
default['gitlab']['unicorn_timeout'] = 30
# Nginx ssl certificates
# Nginx & Nginx ssl certificates
default['gitlab']['install_nginx'] = true
default['gitlab']['ssl_certificate_path'] = "/etc/ssl" # Path to .crt file. If it directory doesn't exist it will be created
default['gitlab']['ssl_certificate_key_path'] = "/etc/ssl" # Path to .key file. If directory doesn't exist it will be created
default['gitlab']['ssl_certificate'] = "" # SSL certificate
......
......@@ -9,7 +9,7 @@ gitlab = node['gitlab']
## Installation
package "nginx" do
action :install
end
end if gitlab['install_nginx']
## Site Configuration
path = platform_family?("rhel") ? "/etc/nginx/conf.d/gitlab.conf" : "/etc/nginx/sites-available/gitlab"
......
......@@ -76,6 +76,19 @@ describe "gitlab::nginx" do
expect(chef_run).to_not create_directory('/data/git')
end
end
describe "when customizing install_nginx" do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['install_nginx'] = false
runner.converge("gitlab::nginx")
end
it 'does not install nginx' do
expect(chef_run).to_not install_package('nginx')
end
end
end
end
......@@ -147,6 +160,19 @@ describe "gitlab::nginx" do
expect(chef_run).to create_directory('/data/git')
end
end
describe "when customizing install_nginx" do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['install_nginx'] = false
runner.converge("gitlab::nginx")
end
it 'does not install nginx' do
expect(chef_run).to_not install_package('nginx')
end
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment