Integrate unattended upgrades + auto-upgrades into apt-templates / main tasks

This commit is contained in:
Mark Janssen 2024-07-11 22:07:10 +02:00
parent cd85772a94
commit 0507d01bc6
4 changed files with 4 additions and 28 deletions

View file

@ -16,16 +16,13 @@
with_items:
- { src: "apt.conf.j2", dest: "/etc/apt/apt.conf" }
- { src: "sources.list.j2", dest: "/etc/apt/sources.list" }
- { src: "apt-auto-upgrades.j2", dest: "/etc/apt/apt.conf.d/20auto-upgrades" }
- { src: "apt-unattended-upgrades.j2", dest: "/etc/apt/apt.conf.d/50unattended-upgrades" }
when:
- ansible_os_family == "Debian"
tags:
- sourceslist
- name: Import unattended-updates
ansible.builtin.import_tasks:
file: unattended-updates.yaml
tags: unattended_updates
- name: Update authorized_keys
ansible.builtin.template:
src: authorized_keys.j2
@ -72,6 +69,8 @@
- tree
- neovim
- vim
- unattended-upgrades
- apt-listchanges
- name: Configure FZF for Bash
ansible.builtin.lineinfile:

View file

@ -1,23 +0,0 @@
---
- name: Install unattended-upgrades
ansible.builtin.apt:
name:
- unattended-upgrades
- apt-listchanges
state: present
- name: Configure auto-upgrades
ansible.builtin.template:
src: auto-upgrades
dest: /etc/apt/apt.conf.d/20auto-upgrades
owner: root
group: root
mode: 0644
- name: Configure unattended-upgrades
ansible.builtin.template:
src: unattended-upgrades
dest: /etc/apt/apt.conf.d/50unattended-upgrades
owner: root
group: root
mode: 0644