18 lines
		
	
	
		
			539 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			539 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
domain = "irc-libera-chat.botka.kosmos.chat"
 | 
						|
 | 
						|
upstream_host = search(:node, "role:hubot").first["knife_zero"]["host"]
 | 
						|
 | 
						|
tls_cert_for domain do
 | 
						|
  auth "gandi_dns"
 | 
						|
  action :create
 | 
						|
end
 | 
						|
 | 
						|
openresty_site domain do
 | 
						|
  template 'nginx_conf_hubot.erb'
 | 
						|
  variables express_port: node['botka_irc-libera-chat']['http_port'],
 | 
						|
            server_name:  domain,
 | 
						|
            ssl_cert:     "/etc/letsencrypt/live/#{domain}/fullchain.pem",
 | 
						|
            ssl_key:      "/etc/letsencrypt/live/#{domain}/privkey.pem",
 | 
						|
            upstream_host: upstream_host
 | 
						|
end
 |