diff --git a/roles/prometheus_exporters/templates/prometheus-borg-textcollector.service.j2 b/roles/prometheus_exporters/templates/prometheus-borg-textcollector.service.j2 index 593a774eef4860048b1bc2049752d69cdb443531..117b1b4ad5b3922b9a75bf9d9bb19bb1f6260d14 100644 --- a/roles/prometheus_exporters/templates/prometheus-borg-textcollector.service.j2 +++ b/roles/prometheus_exporters/templates/prometheus-borg-textcollector.service.j2 @@ -1,7 +1,9 @@ [Unit] Description=Prometheus Borg Exporter TextCollector After=network.target -ConditionPathExistsGlob=!/root/.cache/borg/*/lock.roster +# If the backup snapshot path exists, the backup script runs and a borg +# lockfile exists and we can't run borg list +ConditionPathExists=!/backup [Service] Type=oneshot