projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
godard: enable persistent journald storage. rt#7049
[mirror/dsa-puppet.git]
/
modules
/
roles
/
manifests
/
mirror_health.pp
diff --git
a/modules/roles/manifests/mirror_health.pp
b/modules/roles/manifests/mirror_health.pp
index
1290967
..
ec1102d
100644
(file)
--- 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 = '',
$check_hosts = [],
$check_service = '',
$url = '',
+ $health_url = '',
$check_interval = 60,
) {
package { 'python3-requests':
$check_interval = 60,
) {
package { 'python3-requests':
@@
-14,6
+15,7
@@
define roles::mirror_health (
owner => 'root',
group => 'root',
mode => '0555',
owner => 'root',
group => 'root',
mode => '0555',
+ notify => Service["mirror-health-${check_service}"],
}
file { "/etc/systemd/system/mirror-health-${check_service}.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'),
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":
}
file { "/etc/systemd/system/multi-user.target.wants/mirror-health-${check_service}.service":
@@
-29,4
+31,9
@@
define roles::mirror_health (
target => "../mirror-health-${check_service}.service",
notify => Exec['systemctl daemon-reload'],
}
target => "../mirror-health-${check_service}.service",
notify => Exec['systemctl daemon-reload'],
}
+
+ service { "mirror-health-${check_service}":
+ require => Exec['systemctl daemon-reload'],
+ ensure => running,
+ }
}
}