diff --git a/roles/duplicity/defaults/main.yml b/roles/duplicity/defaults/main.yml index 12cb44838..a274e97a3 100644 --- a/roles/duplicity/defaults/main.yml +++ b/roles/duplicity/defaults/main.yml @@ -23,4 +23,4 @@ duplicity: install_dir: "/opt/duplicity" mail_recipient: "foo@bar.com" retention_period: "12M" - schedule: "0 0 * * *" + schedule: "0 0 * * *" # make this an empty string to not provide a cron job at all diff --git a/roles/duplicity/tasks/main.yml b/roles/duplicity/tasks/main.yml index b1d095b18..db8f0c369 100644 --- a/roles/duplicity/tasks/main.yml +++ b/roles/duplicity/tasks/main.yml @@ -69,6 +69,8 @@ owner: root group: root mode: 0644 + when: + - duplicity.schedule | length > 0 - name: Trigger overrides ansible.builtin.include_role: