X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fmirror_health.pp;h=ec1102d5d5ab28b550c49f0c8453dfe0bdeca5fb;hb=18453c2242fcf0aca0d007f592cfae2f1c1cb513;hp=a00f0a4e5555a1d315498796400e1c4a99d62394;hpb=d2c64af12f4f38013b740fa00b748d76e5462681;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/mirror_health.pp b/modules/roles/manifests/mirror_health.pp index a00f0a4e5..ec1102d5d 100644 --- a/modules/roles/manifests/mirror_health.pp +++ b/modules/roles/manifests/mirror_health.pp @@ -2,6 +2,7 @@ define roles::mirror_health ( $check_hosts = [], $check_service = '', $url = '', + $health_url = '', $check_interval = 60, ) { package { 'python3-requests': @@ -14,6 +15,7 @@ define roles::mirror_health ( owner => 'root', group => 'root', mode => '0555', + notify => Service["mirror-health-${check_service}"], } file { "/etc/systemd/system/mirror-health-${check_service}.service": @@ -21,7 +23,7 @@ define roles::mirror_health ( group => 'root', mode => '0444', content => template('roles/mirror-health.service.erb'), - notify => Exec['systemctl daemon-reload'], + notify => [Exec['systemctl daemon-reload'], Service["mirror-health-${check_service}"]], } file { "/etc/systemd/system/multi-user.target.wants/mirror-health-${check_service}.service": @@ -31,6 +33,7 @@ define roles::mirror_health ( } service { "mirror-health-${check_service}": - ensure => running, + require => Exec['systemctl daemon-reload'], + ensure => running, } }