diff --git a/.fixtures.yml b/.fixtures.yml index c25bfadb4..2fd3ba85c 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -2,6 +2,5 @@ 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 ad796f415..c6d0517f9 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -12,14 +12,13 @@ # 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['systemctl-daemon-reload'], Class['::prometheus::run_service']] + $systemd_notify = [Exec['prometheus-systemd-reload'], Class['::prometheus::run_service']] } else { - $systemd_notify = Exec['systemctl-daemon-reload'] + $systemd_notify = Exec['prometheus-systemd-reload'] } case $prometheus::init_style { @@ -46,6 +45,12 @@ 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/manifests/service_reload.pp b/manifests/service_reload.pp index b974de4e7..c83929e59 100644 --- a/manifests/service_reload.pp +++ b/manifests/service_reload.pp @@ -17,6 +17,7 @@ exec { 'prometheus-reload': command => $prometheus_reload, + path => [ '/usr/bin', '/bin', '/usr/sbin' ], refreshonly => true, } } diff --git a/metadata.json b/metadata.json index 3eb6ce80e..694147e3c 100644 --- a/metadata.json +++ b/metadata.json @@ -12,10 +12,6 @@ "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"