X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fmirror_health.pp;h=41a970d783d473ad0cdd53ddc52c01ea5bfd9cb2;hb=6635c186c4d7bd82e45d64d686679503b5593764;hp=ebc195ea403c80f0bbaa7bca11fec3be11602ea5;hpb=593feee5e82cb42dcb0db963bcf4c194f375bd9c;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/mirror_health.pp b/modules/roles/manifests/mirror_health.pp index ebc195ea4..41a970d78 100644 --- a/modules/roles/manifests/mirror_health.pp +++ b/modules/roles/manifests/mirror_health.pp @@ -7,14 +7,15 @@ define roles::mirror_health ( ) { ensure_packages(['python3-requests'], { ensure => 'installed' }) - # XXX: avoid duplicating this? - file { '/usr/local/sbin/mirror-health': - source => 'puppet:///modules/roles/mirror_health/mirror-health', - owner => 'root', - group => 'root', - mode => '0555', - notify => Service["mirror-health-${check_service}"], - } + if !defined(File['/usr/local/sbin/mirror-health']) { + file { '/usr/local/sbin/mirror-health': + source => 'puppet:///modules/roles/mirror_health/mirror-health', + owner => 'root', + group => 'root', + mode => '0555', + notify => Service["mirror-health-${check_service}"], + } + } file { "/etc/systemd/system/mirror-health-${check_service}.service": owner => 'root',