From 265ecaf19a3c60535498a5523a89b0be36fd4ebe Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Sun, 8 Sep 2024 19:35:35 +0300 Subject: [PATCH] playbook change --- playbook.yaml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 6e2a08f..db81dcf 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -84,18 +84,30 @@ echo "127.0.1.1 {{ serverid }}" >> /etc/hosts changed_when: false - - name: Update and upgrade apt + - name: Update apt cache ansible.builtin.apt: update_cache: true - upgrade: dist - force_apt_get: true - autoremove: true register: apt_update_result retries: 5 delay: 50 until: apt_update_result is succeeded - async: "{{ 60 * 20 }}" - poll: 30 + + - name: Upgrade packages (dist-upgrade) + ansible.builtin.apt: + upgrade: dist + force_apt_get: true + register: apt_upgrade_result + retries: 5 + delay: 50 + until: apt_upgrade_result is succeeded + + - name: Autoremove unused packages + ansible.builtin.apt: + autoremove: true + register: apt_autoremove_result + retries: 5 + delay: 50 + until: apt_autoremove_result is succeeded - name: Install packages ansible.builtin.apt: