From 3c007c58df81eaa8bb104eccdf05d2a00a63872a Mon Sep 17 00:00:00 2001 From: vincent Date: Thu, 24 Aug 2023 18:35:48 +0200 Subject: [PATCH] fix: post upgrade reboot --- tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index e584ed8..4e96945 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,7 +18,7 @@ when: rocky.stdout - name: Install python for debian - ansible.builtin.raw: apt-get install python3 --assume-yes + ansible.builtin.raw: apt install python3 --assume-yes when: debian.stdout - name: Install python on arch @@ -48,7 +48,7 @@ force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases. update_cache: true become: true - register: upgrade + register: upgrade_arch when: arch.stdout - name: Upgrade system for debian @@ -59,12 +59,12 @@ state: latest # not required. choices: absent;build-dep;latest;present. Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies are installed. become: true when: debian.stdout - register: upgrade + register: upgrade_debian - name: Reboot updates to apply reboot: reboot_timeout: 3600 - when: arch.stdout and (upgrade.changed and "linux" in upgrade.packages) + when: (arch.stdout and (upgrade_arch.changed and "linux" in upgrade_arch.packages)) or (debian.stdout and upgrade_debian.changed) become: true - name: Collect only selected facts