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 @@ -
  • - prometheus_cd::main::dirs - -
  • -
  • prometheus_cd::main::files diff --git a/doc/puppet_class_list.html b/doc/puppet_class_list.html index 01e58be..834be82 100644 --- a/doc/puppet_class_list.html +++ b/doc/puppet_class_list.html @@ -57,42 +57,35 @@
  • -
  • -
    - prometheus_cd::main::dirs -
    -
  • - - -
  • +
  • prometheus_cd::main::files
  • -
  • +
  • prometheus_cd::main::install
  • -
  • +
  • prometheus_cd::main::service
  • -
  • +
  • prometheus_cd::main::yumrepo
  • -
  • +
  • prometheus_cd::params
    diff --git a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html index 651cb71..4059ab2 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html @@ -67,8 +67,6 @@
    Inherited by:
    - prometheus_cd::main::dirs
    - prometheus_cd::main::files
    prometheus_cd::main::config
    @@ -308,6 +306,19 @@
  • +
  • + + ps_data_dir + + + (String) + + + (defaults to: '/data/prometheus') + + +
  • + @@ -359,7 +370,8 @@ 54 55 56 -57 +57 +58
    # 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',