Commit b2ad800d authored by Walter Heck's avatar Walter Heck

Make sure grafana understands ldap enabled correctly

parent 5ecc2388
Pipeline #355 passed with stages
in 3 minutes and 18 seconds
For instructions on setting up a development environment using vagrant, see https://gitlab.olindata.com/opstheater/opstheater-docs
For instructions on setting up a development environment using vagrant, see <https://gitlab.olindata.com/opstheater/opstheater-docs>
class opstheater::profile::grafana (
$grafanauser = hiera('opstheater::grafana::grafanauser'),
$grafanapasswd = hiera('opstheater::grafana::grafanapasswd'),
$grafanaurl = hiera('opstheater::grafana::url'),
$grafanaport = hiera('opstheater::grafana::port'),
$grafanaversion = hiera('opstheater::grafana::version'),
$grafana_rpmiteration = hiera('opstheater::grafana::rpm_iteration'),
$elasticsearchurl = hiera('opstheater::grafana::elasticsearchurl'),
$install_method = hiera('opstheater::grafana::install_method'),
$domain = hiera('opstheater::domain'),
$smtp_address = hiera('opstheater::smtp::fqdn'),
$smtp_port = hiera('opstheater::smtp::port'),
$smtp_user_name = hiera('opstheater::smtp::username'),
$smtp_password = hiera('opstheater::smtp::password'),
$smtp_openssl_verify_mode = hiera('opstheater::smtp::openssl_verify_mode'),
$enable_ldap = hiera('opstheater::grafana::ldap::enabled'),
$ldap_server = hiera('opstheater::grafana::ldap::server'),
$ldap_port = hiera('opstheater::grafana::ldap::port'),
$ldap_ssl = hiera('opstheater::grafana::ldap::ssl'),
$ldap_username = hiera('opstheater::grafana::ldap::username'),
$ldap_password = hiera('opstheater::grafana::ldap::password'),
$ldap_base_dn = hiera('opstheater::grafana::ldap::base_dn'),
$ldap_admin_query = hiera('opstheater::grafana::ldap::admin_query'),
$ldap_editor_query = hiera('opstheater::grafana::ldap::editor_query')
String $grafanauser = hiera('opstheater::grafana::grafanauser'),
String $grafanapasswd = hiera('opstheater::grafana::grafanapasswd'),
String $grafanaurl = hiera('opstheater::grafana::url'),
String $grafanaport = hiera('opstheater::grafana::port'),
String $grafanaversion = hiera('opstheater::grafana::version'),
String $grafana_rpmiteration = hiera('opstheater::grafana::rpm_iteration'),
String $elasticsearchurl = hiera('opstheater::grafana::elasticsearchurl'),
String $install_method = hiera('opstheater::grafana::install_method'),
String $domain = hiera('opstheater::domain'),
String $smtp_address = hiera('opstheater::smtp::fqdn'),
String $smtp_port = hiera('opstheater::smtp::port'),
String $smtp_user_name = hiera('opstheater::smtp::username'),
String $smtp_password = hiera('opstheater::smtp::password'),
String $smtp_openssl_verify_mode = hiera('opstheater::smtp::openssl_verify_mode'),
Boolean $enable_ldap = hiera('opstheater::grafana::ldap::enabled'),
String $ldap_server = hiera('opstheater::grafana::ldap::server'),
String $ldap_port = hiera('opstheater::grafana::ldap::port'),
Boolean $ldap_ssl = hiera('opstheater::grafana::ldap::ssl'),
String $ldap_username = hiera('opstheater::grafana::ldap::username'),
String $ldap_password = hiera('opstheater::grafana::ldap::password'),
String $ldap_base_dn = hiera('opstheater::grafana::ldap::base_dn'),
String $ldap_admin_query = hiera('opstheater::grafana::ldap::admin_query'),
String $ldap_editor_query = hiera('opstheater::grafana::ldap::editor_query')
) {
if $enable_ldap {
# Specifically convert the class parameter to boolean as the hiera call always returns a string
$bool_enable_ldap = str2bool($enable_ldap)
if $bool_enable_ldap {
$ldap_config = {
'auth.ldap' => {
enabled => true,
......
input{
beats {
<% unless @input_beats_port.nil? %>port => <%= @input_beats_port%><% end %>
<% unless @input_beats_type.nil? %>type => "<%= @input_beats_type%>"<% end %>
<% unless @input_beats_type.nil? %>type => "<%= @input_beats_type%>"<% 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