This commit is contained in:
2022-01-22 00:06:54 +01:00
parent affd97ff4c
commit b1fe98ea30
12 changed files with 444 additions and 19 deletions

View File

@ -24,6 +24,11 @@
tags:
- symlink-sh
# ----------
# systemd stuff
# ----------
- name: (basic.yml) Ensure directory '/etc/systemd/system.conf.d' exists
file:
path: /etc/systemd/system.conf.d
@ -55,6 +60,11 @@
tags:
- systemd-config
# ----------
# kernel parameter
# ----------
- name: (basic.yml) Ensure directory '/etc/sysctl.d' exists
file:
path: etc/sysctl.d
@ -86,3 +96,55 @@
tags:
- systctl-config
# ----------
# unattended upgrades
# ----------
- name: (basic.yml) install unattended-upgrades
apt: pkg=unattended-upgrades state=present
tags:
- unattended-upgrades
- name: (basic.yml) install apt-listchanges
apt: pkg=apt-listchanges state=present
tags:
- unattended-upgrades
- name: (basic.yml) remove apticron
apt: pkg=apticron state=absent
tags:
- unattended-upgrades
- name: (basic.yml) check if /etc/apt/apt.conf.d/20auto-upgrades exists
stat: path=/etc/apt/apt.conf.d/20auto-upgrades
register: ua_enabled
tags:
- unattended-upgrades
- name: (basic.yml) activate unattended upgrades
shell: dpkg-reconfigure -plow unattended-upgrades
when: ua_enabled.stat.exists == False
tags:
- unattended-upgrades
- name: (basic.yml) copy apt-listchanges.conf
template:
src: etc/apt/listchanges.conf.j2
dest: /etc/apt/listchanges.conf
owner: root
group: root
mode: 0644
tags:
- unattended-upgrades
- name: (basic.yml) copy unattended-upgrades conf
template:
src: etc/apt/apt.conf.d/50unattended-upgrades.j2
dest: /etc/apt/apt.conf.d/50unattended-upgrades
backup: yes
owner: root
group: root
mode: 0644
tags:
- unattended-upgrades