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_3Amain_3A_3Afiles.html b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html index d154ff8..3d626a5 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html @@ -126,7 +126,7 @@ class prometheus_cd::main::files ( ) inherits prometheus_cd::params { require prometheus_cd::main::dirs - if $ps_prom_host == fqdn { + if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) { file { $ps_main_file: ensure => file, owner => 'root', diff --git a/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Aservice.html index 7307ffe..46a7254 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Aservice.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Aservice.html @@ -128,9 +128,9 @@ class prometheus_cd::main::service ( ) inherits prometheus_cd::params { - require prometheus_cd::main::files - require prometheus_cd::firewall::iptables if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) { + require prometheus_cd::main::files + require prometheus_cd::firewall::iptables service { $ps_prom_service: ensure => running, hasstatus => true, diff --git a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html index 651cb71..931149e 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
    diff --git a/manifests/main/dirs.pp b/manifests/main/dirs.pp index 3c24a54..691e771 100644 --- a/manifests/main/dirs.pp +++ b/manifests/main/dirs.pp @@ -6,7 +6,7 @@ class prometheus_cd::main::dirs ( ) inherits prometheus_cd::params { require prometheus_cd::main::install - if $ps_prom_host == fqdn { + ($ps_prom_host == $fqdn) and ($manage_prometheus == true) { file { $ps_main_dir: ensure => directory, owner => 'root', diff --git a/manifests/main/files.pp b/manifests/main/files.pp index cdb7623..a7529c9 100644 --- a/manifests/main/files.pp +++ b/manifests/main/files.pp @@ -6,7 +6,7 @@ class prometheus_cd::main::files ( ) inherits prometheus_cd::params { require prometheus_cd::main::dirs - if $ps_prom_host == fqdn { + if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) { file { $ps_main_file: ensure => file, owner => 'root', diff --git a/manifests/main/service.pp b/manifests/main/service.pp index 0acde91..21e3db3 100644 --- a/manifests/main/service.pp +++ b/manifests/main/service.pp @@ -5,9 +5,9 @@ ############################################################################## class prometheus_cd::main::service ( ) inherits prometheus_cd::params { - require prometheus_cd::main::files - require prometheus_cd::firewall::iptables if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) { + require prometheus_cd::main::files + require prometheus_cd::firewall::iptables service { $ps_prom_service: ensure => running, hasstatus => true, diff --git a/templates/prometheus.yml.erb b/templates/prometheus.yml.erb index e75b941..9c8521a 100644 --- a/templates/prometheus.yml.erb +++ b/templates/prometheus.yml.erb @@ -1,3 +1,7 @@ +############################################################################### +##### File created by Puppet - manual changes will be overwritten ##### +############################################################################### + global: scrape_interval: 60s scrape_timeout: 10s