diff --git a/.fixtures.yml b/.fixtures.yml index 2fd3ba85c..c25bfadb4 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -2,5 +2,6 @@ fixtures: repositories: archive: "https://github.com/voxpupuli/puppet-archive" stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib" + systemd: "https://github.com/camptocamp/puppet-systemd" symlinks: "prometheus": "#{source_dir}" diff --git a/manifests/config.pp b/manifests/config.pp index 0d05d30e1..ad796f415 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -12,13 +12,14 @@ # the vast majority of files here are init-files # so any change there should trigger a full service restart + # systemd reload comes from the systemd module if $::prometheus::restart_on_change { File { notify => [Class['::prometheus::run_service']], } - $systemd_notify = [Exec['prometheus-systemd-reload'], Class['::prometheus::run_service']] + $systemd_notify = [Exec['systemctl-daemon-reload'], Class['::prometheus::run_service']] } else { - $systemd_notify = Exec['prometheus-systemd-reload'] + $systemd_notify = Exec['systemctl-daemon-reload'] } case $prometheus::init_style { @@ -45,11 +46,6 @@ notify => $systemd_notify, content => template('prometheus/prometheus.systemd.erb'), } - exec { 'prometheus-systemd-reload': - command => 'systemctl daemon-reload', - path => [ '/usr/bin', '/bin', '/usr/sbin' ], - refreshonly => true, - } } 'sysv' : { file { '/etc/init.d/prometheus': diff --git a/metadata.json b/metadata.json index 694147e3c..3eb6ce80e 100644 --- a/metadata.json +++ b/metadata.json @@ -12,6 +12,10 @@ "name":"puppet/archive", "version_requirement":">=1.3.0 <2.0.0" }, + { + "name":"camptocamp/systemd", + "version_requirement":">=0.4.0 <1.0.0" + }, { "name":"puppetlabs/stdlib", "version_requirement":">= 4.6.0 <5.0.0"