$check_hosts = [],
$check_service = '',
$url = '',
+ $health_url = '',
$check_interval = 60,
) {
package { 'python3-requests':
owner => 'root',
group => 'root',
mode => '0555',
+ notify => Service["mirror-health-${check_service}"],
}
file { "/etc/systemd/system/mirror-health-${check_service}.service":
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":
}
service { "mirror-health-${check_service}":
- ensure => running,
+ require => Exec['systemctl daemon-reload'],
+ ensure => running,
}
}