Add automirror support to Ansible

This commit is contained in:
2024-11-15 01:51:04 -05:00
parent 6d75b33d17
commit dd451c70c3
10 changed files with 210 additions and 25 deletions

View 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 %}

View 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