Don't use Let's Encrypt in development environment
This commit is contained in:
		
							parent
							
								
									3158cf9550
								
							
						
					
					
						commit
						555195c32f
					
				@ -7,8 +7,6 @@
 | 
				
			|||||||
# All rights reserved - Do Not Redistribute
 | 
					# All rights reserved - Do Not Redistribute
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
include_recipe "kosmos-base::letsencrypt"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
firewall_rule 'sockethub' do
 | 
					firewall_rule 'sockethub' do
 | 
				
			||||||
  port     node['sockethub']['external_port'].to_i
 | 
					  port     node['sockethub']['external_port'].to_i
 | 
				
			||||||
  protocol :tcp
 | 
					  protocol :tcp
 | 
				
			||||||
@ -37,11 +35,15 @@ template "#{node['nginx']['dir']}/sites-available/sockethub" do
 | 
				
			|||||||
  notifies :reload, 'service[nginx]', :delayed
 | 
					  notifies :reload, 'service[nginx]', :delayed
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
execute "letsencrypt cert for sockethub.kosmos.org" do
 | 
					unless node.chef_environment == "development"
 | 
				
			||||||
 | 
					  include_recipe "kosmos-base::letsencrypt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  execute "letsencrypt cert for sockethub.kosmos.org" do
 | 
				
			||||||
    command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path /var/www/sockethub -d sockethub.kosmos.org -n"
 | 
					    command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path /var/www/sockethub -d sockethub.kosmos.org -n"
 | 
				
			||||||
    cwd "/usr/local/certbot"
 | 
					    cwd "/usr/local/certbot"
 | 
				
			||||||
    not_if { File.exist? "/etc/letsencrypt/live/sockethub.kosmos.org/fullchain.pem" }
 | 
					    not_if { File.exist? "/etc/letsencrypt/live/sockethub.kosmos.org/fullchain.pem" }
 | 
				
			||||||
    notifies :reload, "service[nginx]", :delayed
 | 
					    notifies :reload, "service[nginx]", :delayed
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
nginx_site 'sockethub' do
 | 
					nginx_site 'sockethub' do
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user