This commit is contained in:
parent
a288c8a71b
commit
3c007c58df
@ -18,7 +18,7 @@
|
|||||||
when: rocky.stdout
|
when: rocky.stdout
|
||||||
|
|
||||||
- name: Install python for debian
|
- 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
|
when: debian.stdout
|
||||||
|
|
||||||
- name: Install python on arch
|
- 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.
|
force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
|
||||||
update_cache: true
|
update_cache: true
|
||||||
become: true
|
become: true
|
||||||
register: upgrade
|
register: upgrade_arch
|
||||||
when: arch.stdout
|
when: arch.stdout
|
||||||
|
|
||||||
- name: Upgrade system for debian
|
- 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.
|
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
|
become: true
|
||||||
when: debian.stdout
|
when: debian.stdout
|
||||||
register: upgrade
|
register: upgrade_debian
|
||||||
|
|
||||||
- name: Reboot updates to apply
|
- name: Reboot updates to apply
|
||||||
reboot:
|
reboot:
|
||||||
reboot_timeout: 3600
|
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
|
become: true
|
||||||
|
|
||||||
- name: Collect only selected facts
|
- name: Collect only selected facts
|
||||||
|
Loading…
Reference in New Issue
Block a user