ansible/roles/baseconfig/tasks/apt-listchanges.yml
Hadrien Patte b55a2ee047
Fix: add a retry statement to remote package tasks
Signed-off-by: Hadrien Patte <hadrien.patte@protonmail.com>
2019-03-03 19:55:51 +01:00

22 lines
552 B
YAML

---
# Install apt-listchanges
- name: Install apt-listchanges
when: ansible_os_family == "Debian"
apt:
name: apt-listchanges
state: present
update_cache: true
register: apt_result
retries: 3
until: apt_result is succeeded
# Send email when there is something new
- name: Configure apt-listchanges
lineinfile:
dest: /etc/apt/listchanges.conf
regexp: "^{{ item.key }}="
line: "{{ item.value }}"
with_dict:
confirm: 'confirm=true'
email_address: "email_address={{ monitoring_mail }}"
which: 'which=both'