This commit is contained in:
@@ -31,5 +31,17 @@ class prometheus_cd::main::files (
|
|||||||
content => template('prometheus_cd/override.conf.erb'),
|
content => template('prometheus_cd/override.conf.erb'),
|
||||||
notify => Service[$ps_prom_service],
|
notify => Service[$ps_prom_service],
|
||||||
}
|
}
|
||||||
|
file { $ps_web_config_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
content => template('prometheus_cd/web.yml.erb'),
|
||||||
|
notify => Service[$ps_prom_service],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
# @param [String] ps_main_port the firewall main port for prometheus
|
# @param [String] ps_main_port the firewall main port for prometheus
|
||||||
# @param [String] ps_auth_user the username for authentication
|
# @param [String] ps_auth_user the username for authentication
|
||||||
# @param [String] ps_auth_pass the password for authentication
|
# @param [String] ps_auth_pass the password for authentication
|
||||||
|
# @param [String] ps_web_pass the password for web authentication
|
||||||
# @param [String] ps_retention_time tsdb retention time
|
# @param [String] ps_retention_time tsdb retention time
|
||||||
# @param [String] ps_retention_size tsdb retention size
|
# @param [String] ps_retention_size tsdb retention size
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -36,6 +37,7 @@ class prometheus_cd::params (
|
|||||||
# auth
|
# auth
|
||||||
String $ps_auth_user = 'changeme',
|
String $ps_auth_user = 'changeme',
|
||||||
String $ps_auth_pass = 'changeme',
|
String $ps_auth_pass = 'changeme',
|
||||||
|
String $ps_web_pass = 'changeme',
|
||||||
|
|
||||||
# storage
|
# storage
|
||||||
String $ps_retention_time = '15d',
|
String $ps_retention_time = '15d',
|
||||||
@@ -54,6 +56,7 @@ class prometheus_cd::params (
|
|||||||
|
|
||||||
# files
|
# files
|
||||||
$ps_main_file = "${ps_main_dir}/prometheus.yml"
|
$ps_main_file = "${ps_main_dir}/prometheus.yml"
|
||||||
|
$ps_web_config_file = "${ps_main_dir}/web.yml"
|
||||||
$ps_system_service_file = "${ps_system_file_dir}/override.conf"
|
$ps_system_service_file = "${ps_system_file_dir}/override.conf"
|
||||||
|
|
||||||
# services
|
# services
|
||||||
|
|||||||
5
templates/web.yml.erb
Normal file
5
templates/web.yml.erb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
##############################################################################
|
||||||
|
##### File created by Puppet - manual changes will be overwritten #####
|
||||||
|
###############################################################################
|
||||||
|
basic_auth_users:
|
||||||
|
<%= @ps_auth_user %>: <%= @ps_web_pass %>
|
||||||
Reference in New Issue
Block a user