diff --git a/roles/pvc/templates/autobackup/pvc-autobackup-full.service.j2 b/roles/pvc/templates/autobackup/pvc-autobackup-full.service.j2 index 6b6eba5..e71f325 100644 --- a/roles/pvc/templates/autobackup/pvc-autobackup-full.service.j2 +++ b/roles/pvc/templates/autobackup/pvc-autobackup-full.service.j2 @@ -5,4 +5,5 @@ Description=[Cron] PVC VM autobackup (forced-full) Type=oneshot IgnoreSIGPIPE=false KillMode=process +ExecCondition=/usr/bin/pvc --quiet node is-primary ExecStart=/usr/bin/pvc --quiet vm autobackup --cron --force-full {% if pvc_autobackup.reporting.enabled and pvc_autobackup.reporting.report_on.forced_full %}--email-report {{ pvc_autobackup.reporting.emails|join(',') }}{% endif %} diff --git a/roles/pvc/templates/autobackup/pvc-autobackup-normal.service.j2 b/roles/pvc/templates/autobackup/pvc-autobackup-normal.service.j2 index 129a7fe..5ecb2ec 100644 --- a/roles/pvc/templates/autobackup/pvc-autobackup-normal.service.j2 +++ b/roles/pvc/templates/autobackup/pvc-autobackup-normal.service.j2 @@ -5,4 +5,5 @@ Description=[Cron] PVC VM autobackup (normal) Type=oneshot IgnoreSIGPIPE=false KillMode=process +ExecCondition=/usr/bin/pvc --quiet node is-primary ExecStart=/usr/bin/pvc --quiet vm autobackup --cron {% if pvc_autobackup.reporting.enabled and pvc_autobackup.reporting.report_on.normal %}--email-report {{ pvc_autobackup.reporting.emails|join(',') }}{% endif %}