X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fmirror_health.pp;fp=modules%2Froles%2Fmanifests%2Fmirror_health.pp;h=41a970d783d473ad0cdd53ddc52c01ea5bfd9cb2;hb=76ca91bce24ecbcbcc4e62a37aa06fd0fb9f96c7;hp=ec1102d5d5ab28b550c49f0c8453dfe0bdeca5fb;hpb=46cee04ab06b23ab6e9e4baba655cf470d10cfc4;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/mirror_health.pp b/modules/roles/manifests/mirror_health.pp index ec1102d5d..41a970d78 100644 --- a/modules/roles/manifests/mirror_health.pp +++ b/modules/roles/manifests/mirror_health.pp @@ -5,18 +5,17 @@ define roles::mirror_health ( $health_url = '', $check_interval = 60, ) { - package { 'python3-requests': - ensure => installed, - } + 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',