Fix letsencrypt bootstrap for ejabberd
This commit is contained in:
		
							parent
							
								
									b3f1a74cc2
								
							
						
					
					
						commit
						e89e0b3122
					
				| @ -7,8 +7,8 @@ default_run_list = %w( | |||||||
| 
 | 
 | ||||||
| production_run_list = %w( | production_run_list = %w( | ||||||
|   role[postgresql_client] |   role[postgresql_client] | ||||||
|   kosmos-ejabberd::default |  | ||||||
|   kosmos-ejabberd::letsencrypt |   kosmos-ejabberd::letsencrypt | ||||||
|  |   kosmos-ejabberd::default | ||||||
| ) | ) | ||||||
| env_run_lists( | env_run_lists( | ||||||
|   'development' => default_run_list, |   'development' => default_run_list, | ||||||
|  | |||||||
| @ -52,6 +52,7 @@ end | |||||||
|   end |   end | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
|  | # TODO check if nginx is installed/running on the node | ||||||
| file "/etc/letsencrypt/renewal-hooks/deploy/nginx" do | file "/etc/letsencrypt/renewal-hooks/deploy/nginx" do | ||||||
|   content <<-EOF |   content <<-EOF | ||||||
| #!/usr/bin/env bash | #!/usr/bin/env bash | ||||||
|  | |||||||
| @ -1,11 +1,7 @@ | |||||||
| # Generated by Chef for <%= @host[:name] %> | # Generated by Chef for <%= @host[:name] %> | ||||||
| # FIXME: The files only exist after the certbot hook created them, meaning |  | ||||||
| # we need to run Chef a second time |  | ||||||
| <% if File.exist?("/opt/ejabberd/conf/#{@host[:name]}.crt") && File.exist?("/opt/ejabberd/conf/#{@host[:name]}.key") -%> |  | ||||||
| certfiles: | certfiles: | ||||||
|   - "/opt/ejabberd/conf/<%= @host[:name] %>.crt" |   - "/opt/ejabberd/conf/<%= @host[:name] %>.crt" | ||||||
|   - "/opt/ejabberd/conf/<%= @host[:name] %>.key" |   - "/opt/ejabberd/conf/<%= @host[:name] %>.key" | ||||||
| <% end -%> |  | ||||||
| host_config: | host_config: | ||||||
|   "<%= @host[:name] %>": |   "<%= @host[:name] %>": | ||||||
|     sql_type: pgsql |     sql_type: pgsql | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user