Add automirror support to Ansible
This commit is contained in:
9
roles/pvc/templates/automirror/pvc-automirror.service.j2
Normal file
9
roles/pvc/templates/automirror/pvc-automirror.service.j2
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=[Cron] PVC VM automirror
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
IgnoreSIGPIPE=false
|
||||
KillMode=process
|
||||
ExecCondition=/usr/bin/pvc --quiet node is-primary
|
||||
ExecStart=/usr/bin/pvc --quiet vm automirror --cron {% if pvc_automirror.reporting.enabled and (pvc_automirror.reporting.report_on.error or pvc_automirror.reporting.report_on.success) %}--email-report {{ pvc_automirror.reporting.emails|join(',') }}{% endif %} {% if pvc_automirror.reporting.enabled and (pvc_automirror.reporting.report_on.error and not pvc_automirror.reporting.report_on.success) %}--email-errors-only{% endif %}
|
9
roles/pvc/templates/automirror/pvc-automirror.timer.j2
Normal file
9
roles/pvc/templates/automirror/pvc-automirror.timer.j2
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=[Timer] PVC VM automirror
|
||||
|
||||
[Timer]
|
||||
Unit=pvc-automirror.service
|
||||
OnCalendar={{ pvc_automirror.schedule.time }}
|
||||
|
||||
[Install]
|
||||
WantedBy=pvc.target
|
Reference in New Issue
Block a user