diff --git a/README.md b/README.md index 7fbac6d..72b3f62 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ The different tasks should be used on a case-by-case basis: become: yes apt: name: ufw - state: latest + state: present ``` diff --git a/tasks/borgbackup-Debian.yml b/tasks/borgbackup-Debian.yml index ac83e1c..f3c06fb 100644 --- a/tasks/borgbackup-Debian.yml +++ b/tasks/borgbackup-Debian.yml @@ -10,9 +10,7 @@ become: yes apt: name: borgbackup - state: latest - update_cache: yes - cache_valid_time: 3600 + state: present when: - borgbackup_host is defined - borgbackup_sub is defined diff --git a/tasks/caddy-install.yml b/tasks/caddy-install.yml index 5c20e82..be7553f 100644 --- a/tasks/caddy-install.yml +++ b/tasks/caddy-install.yml @@ -33,7 +33,7 @@ become: yes apt: name: libcap2-bin - state: latest + state: present - name: caddyserver - Give caddy port binding capabilities become: yes shell: "setcap cap_net_bind_service=+ep /usr/local/bin/caddy" diff --git a/tasks/cronmails.yml b/tasks/cronmails.yml index ff19c11..c460126 100644 --- a/tasks/cronmails.yml +++ b/tasks/cronmails.yml @@ -6,7 +6,7 @@ become: yes apt: name: "{{ packages }}" - state: latest + state: present vars: packages: - exim4 diff --git a/tasks/docker.yml b/tasks/docker.yml index aae3022..3227d6b 100644 --- a/tasks/docker.yml +++ b/tasks/docker.yml @@ -6,7 +6,7 @@ become: yes apt: name: "{{ packages }}" - state: latest + state: present vars: packages: - apt-transport-https diff --git a/tasks/telegraf.yml b/tasks/telegraf.yml index 7f5e94a..fef8d07 100644 --- a/tasks/telegraf.yml +++ b/tasks/telegraf.yml @@ -8,7 +8,7 @@ become: yes apt: name: apt-transport-https - state: latest + state: present - name: telegraf - Add telegraf repo key become: yes apt_key: diff --git a/templates/borgbackup.sh b/templates/borgbackup.sh index 3f9e851..d7846b7 100644 --- a/templates/borgbackup.sh +++ b/templates/borgbackup.sh @@ -42,12 +42,12 @@ borg create \ backup_exit=$? -# Prune old backups: keep 7 daily, 4 weekly and 3 monthly +# Prune old backups: keep 7 daily, 3 weekly and 2 monthly (3 months total) borg prune \ --prefix '{{ borgbackup_host }}-' \ --keep-daily 7 \ - --keep-weekly 4 \ - --keep-monthly 3 + --keep-weekly 3 \ + --keep-monthly 2 prune_exit=$?