From d15b177f3d769a6d78565f05f135253677c125a6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 20 Jan 2026 21:44:57 +0100 Subject: [PATCH] =?UTF-8?q?update.yml=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 update.yml diff --git a/update.yml b/update.yml new file mode 100644 index 0000000..376a16a --- /dev/null +++ b/update.yml @@ -0,0 +1,19 @@ +--- +- name: Update and upgrade all apt-based hosts + hosts: all + become: true + + tasks: + - name: Update apt cache + ansible.builtin.apt: + update_cache: yes + cache_valid_time: 3600 + + - name: Upgrade all packages + ansible.builtin.apt: + upgrade: dist + + - name: Remove unused packages + ansible.builtin.apt: + autoremove: yes + autoclean: yes