2019-02-05 08:35:45 +01:00
|
|
|
---
|
|
|
|
# Install apt-listchanges
|
|
|
|
- name: Install apt-listchanges
|
|
|
|
when: ansible_os_family == "Debian"
|
|
|
|
apt:
|
|
|
|
name: apt-listchanges
|
|
|
|
state: present
|
2019-03-03 09:00:29 +01:00
|
|
|
update_cache: true
|
2019-03-03 19:28:57 +01:00
|
|
|
register: apt_result
|
|
|
|
retries: 3
|
|
|
|
until: apt_result is succeeded
|
2019-02-05 08:35:45 +01:00
|
|
|
|
|
|
|
# Send email when there is something new
|
|
|
|
- name: Configure apt-listchanges
|
2019-03-23 19:10:56 +01:00
|
|
|
ini_file:
|
|
|
|
path: /etc/apt/listchanges.conf
|
|
|
|
no_extra_spaces: true
|
|
|
|
section: apt
|
|
|
|
option: "{{ item.option }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
state: present
|
|
|
|
loop:
|
|
|
|
- option: confirm
|
|
|
|
value: "true"
|
|
|
|
|
|
|
|
- option: email_address
|
|
|
|
value: "{{ monitoring_mail }}"
|
|
|
|
|
|
|
|
- option: which
|
|
|
|
value: both
|
|
|
|
...
|