diff --git a/doc/_index.html b/doc/_index.html index 6846631..bd8f09f 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -83,11 +83,6 @@ -
# File 'manifests/params.pp', line 17
@@ -376,6 +388,7 @@ class prometheus_cd::params (
Boolean $manage_node_exporter = false,
Boolean $ps_manage_fw = false,
String $ps_prom_host = 'prometheus.example.net',
+ String $ps_data_dir = '/data/prometheus',
# firewall
String $ps_fw_prefix = '50',
diff --git a/manifests/main/dirs.pp b/manifests/main/dirs.pp
index d2ff590..dfbd93c 100644
--- a/manifests/main/dirs.pp
+++ b/manifests/main/dirs.pp
@@ -7,6 +7,7 @@ class prometheus_cd::main::dirs (
) inherits prometheus_cd::params {
require prometheus_cd::main::install
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
+ # prometheus directors
file { $ps_main_dir:
ensure => directory,
owner => 'root',
@@ -17,5 +18,16 @@ class prometheus_cd::main::dirs (
seltype => etc_t,
seluser => system_u,
}
+ # data directory
+ file { $ps_data_dir,
+ ensure => directory,
+ owner => 'prometheus',
+ group => 'prometheus',
+ mode => '0750',
+# selrange => s0,
+# selrole => object_r,
+# seltype => etc_t,
+# seluser => system_u,
+ }
}
}
diff --git a/manifests/params.pp b/manifests/params.pp
index c6f0a22..a41f820 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -26,6 +26,7 @@ class prometheus_cd::params (
Boolean $manage_node_exporter = false,
Boolean $ps_manage_fw = false,
String $ps_prom_host = 'prometheus.example.net',
+ String $ps_data_dir = '/data/prometheus',
# firewall
String $ps_fw_prefix = '50',