WIP: Various cleanups #83
6 changed files with 4 additions and 46 deletions
|
@ -8,6 +8,7 @@
|
||||||
- fr_FR.UTF-8
|
- fr_FR.UTF-8
|
||||||
roles:
|
roles:
|
||||||
- debian_common
|
- debian_common
|
||||||
|
- apt_common
|
||||||
- locales
|
- locales
|
||||||
- basesecurity
|
- basesecurity
|
||||||
- logrotate
|
- logrotate
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
---
|
---
|
||||||
- name: Install unattended-upgrades
|
- name: Install unattended-upgrades
|
||||||
when: ansible_os_family == "Debian"
|
|
||||||
apt:
|
apt:
|
||||||
name: unattended-upgrades
|
name: unattended-upgrades
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
register: apt_result
|
|
||||||
retries: 3
|
|
||||||
until: apt_result is succeeded
|
|
||||||
|
|
||||||
- name: Configure unattended-upgrades
|
- name: Configure unattended-upgrades
|
||||||
template:
|
template:
|
||||||
src: "apt/{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
dest: "/etc/apt/apt.conf.d/{{ item }}"
|
dest: "/etc/apt/apt.conf.d/{{ item }}"
|
||||||
owner: root
|
owner: root
|
||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
loop:
|
loop:
|
||||||
- 50unattended-upgrades
|
|
||||||
- 20auto-upgrades
|
- 20auto-upgrades
|
||||||
|
- 50unattended-upgrades
|
||||||
...
|
...
|
|
@ -1,32 +0,0 @@
|
||||||
---
|
|
||||||
# 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
|
|
||||||
ini_file:
|
|
||||||
path: /etc/apt/listchanges.conf
|
|
||||||
no_extra_spaces: true
|
|
||||||
section: apt
|
|
||||||
option: "{{ item.option }}"
|
|
||||||
value: "{{ item.value }}"
|
|
||||||
state: present
|
|
||||||
mode: 0644
|
|
||||||
loop:
|
|
||||||
- option: confirm
|
|
||||||
value: "true"
|
|
||||||
|
|
||||||
- option: email_address
|
|
||||||
value: "{{ monitoring_mail }}"
|
|
||||||
|
|
||||||
- option: which
|
|
||||||
value: both
|
|
||||||
...
|
|
|
@ -39,12 +39,6 @@
|
||||||
dest: /etc/apt/sources.list
|
dest: /etc/apt/sources.list
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
# APT-List Changes : send email with changelog
|
|
||||||
- include_tasks: apt-listchanges.yml
|
|
||||||
|
|
||||||
# APT Unattended upgrades
|
|
||||||
- include_tasks: apt-unattended.yml
|
|
||||||
|
|
||||||
- name: Configure resolvconf
|
- name: Configure resolvconf
|
||||||
template:
|
template:
|
||||||
src: resolv.conf
|
src: resolv.conf
|
||||||
|
@ -65,3 +59,4 @@
|
||||||
- name: Remove dependencies that are no longer required
|
- name: Remove dependencies that are no longer required
|
||||||
apt:
|
apt:
|
||||||
autoremove: true
|
autoremove: true
|
||||||
|
...
|
||||||
|
|
Loading…
Reference in a new issue