mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	kandra: Template and insert email credentials.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							75411b264e
						
					
				
				
					commit
					e06b1794a8
				
			@@ -56,6 +56,10 @@ class kandra::profile::grafana inherits kandra::profile::base {
 | 
				
			|||||||
    notify  => Service[supervisor],
 | 
					    notify  => Service[supervisor],
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  $email_host = zulipconf('grafana', 'email_host', '')
 | 
				
			||||||
 | 
					  $email_from = zulipconf('grafana', 'email_from', '')
 | 
				
			||||||
 | 
					  $email_user = zulipsecret('secrets', 'grafana_email_user', '')
 | 
				
			||||||
 | 
					  $email_password = zulipsecret('secrets', 'grafana_email_password', '')
 | 
				
			||||||
  file { '/etc/grafana':
 | 
					  file { '/etc/grafana':
 | 
				
			||||||
    ensure => directory,
 | 
					    ensure => directory,
 | 
				
			||||||
    owner  => 'root',
 | 
					    owner  => 'root',
 | 
				
			||||||
@@ -67,7 +71,7 @@ class kandra::profile::grafana inherits kandra::profile::base {
 | 
				
			|||||||
    owner   => 'root',
 | 
					    owner   => 'root',
 | 
				
			||||||
    group   => 'root',
 | 
					    group   => 'root',
 | 
				
			||||||
    mode    => '0644',
 | 
					    mode    => '0644',
 | 
				
			||||||
    source => 'puppet:///modules/kandra/grafana/grafana.ini',
 | 
					    content => template('kandra/grafana.ini.template.erb'),
 | 
				
			||||||
    notify  => Service[supervisor],
 | 
					    notify  => Service[supervisor],
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,6 +29,17 @@ domain = monitoring.teleport.zulipchat.net
 | 
				
			|||||||
root_url = https://monitoring.teleport.zulipchat.net/
 | 
					root_url = https://monitoring.teleport.zulipchat.net/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#################################### SMTP ####################################
 | 
				
			||||||
 | 
					[smtp]
 | 
				
			||||||
 | 
					enabled = true
 | 
				
			||||||
 | 
					from_name = Grafana
 | 
				
			||||||
 | 
					from_address = <%= @email_from %>
 | 
				
			||||||
 | 
					host = <%= @email_host %>
 | 
				
			||||||
 | 
					user = <%= @email_user %>
 | 
				
			||||||
 | 
					password = <%= @email_password %>
 | 
				
			||||||
 | 
					startTLS_policy = MandatoryStartTLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#################################### Auth JWT ####################################
 | 
					#################################### Auth JWT ####################################
 | 
				
			||||||
[auth.jwt]
 | 
					[auth.jwt]
 | 
				
			||||||
# Grafana should trust the JWT that is provided in a header from Teleport; see
 | 
					# Grafana should trust the JWT that is provided in a header from Teleport; see
 | 
				
			||||||
		Reference in New Issue
	
	Block a user