1 define roles::mirror_health (
8 ensure_packages(['python3-requests'], { ensure => 'installed' })
10 if !defined(File['/usr/local/sbin/mirror-health']) {
11 file { '/usr/local/sbin/mirror-health':
12 source => 'puppet:///modules/roles/mirror_health/mirror-health',
16 notify => Service["mirror-health-${check_service}"],
20 file { "/etc/systemd/system/mirror-health-${check_service}.service":
24 content => template('roles/mirror-health.service.erb'),
25 notify => [Exec['systemctl daemon-reload'], Service["mirror-health-${check_service}"]],
28 file { "/etc/systemd/system/multi-user.target.wants/mirror-health-${check_service}.service":
30 target => "../mirror-health-${check_service}.service",
31 notify => Exec['systemctl daemon-reload'],
34 service { "mirror-health-${check_service}":
35 require => Exec['systemctl daemon-reload'],