This commit is contained in:
parent
42f8b95019
commit
7b2305437d
@ -5,13 +5,25 @@
|
||||
raw: uname -a|grep Debian||true
|
||||
register: debian
|
||||
|
||||
- name: detect Rocky
|
||||
raw: cat /etc/os-release|grep rocky||true
|
||||
register: rocky
|
||||
|
||||
- name: detect arch
|
||||
raw: uname -a|grep arch||true
|
||||
register: arch
|
||||
|
||||
- name: "install python for rocky"
|
||||
raw: dnf install python3 --assumeyes
|
||||
when: rocky.stdout
|
||||
|
||||
- name: "install python for debian"
|
||||
raw: apt-get install python3 --assume-yes
|
||||
when: debian.stdout
|
||||
|
||||
- name: "install python on arch"
|
||||
raw: pacman -Sy python --noconfirm
|
||||
when: not debian.stdout
|
||||
when: arch.stdout
|
||||
|
||||
|
||||
- name: add local repo to mirrorlist
|
||||
@ -21,7 +33,7 @@
|
||||
line: "Server= {{system_arch_local_mirror}}/$repo/os/$arch"
|
||||
state: present
|
||||
insertbefore: BOF
|
||||
when: system_arch_local_mirror is defined and not debian.stdout
|
||||
when: system_arch_local_mirror is defined and arch.stdout
|
||||
|
||||
- name: upgrade system for arch
|
||||
pacman:
|
||||
@ -31,7 +43,7 @@
|
||||
update_cache: true
|
||||
become: yes
|
||||
register: upgrade
|
||||
when: not debian.stdout
|
||||
when: arch.stdout
|
||||
|
||||
- name: upgrade system for debian
|
||||
apt:
|
||||
@ -46,7 +58,7 @@
|
||||
- name: Reboot updates to apply
|
||||
reboot:
|
||||
reboot_timeout: 3600
|
||||
when: not debian.stdout and (upgrade.changed and "linux" in upgrade.packages)
|
||||
when: arch.stdout and (upgrade.changed and "linux" in upgrade.packages)
|
||||
become: yes
|
||||
|
||||
- name: import sssd role for ldap support
|
||||
@ -63,6 +75,7 @@
|
||||
package:
|
||||
state: present
|
||||
name: inetutils
|
||||
when: arch.stdout
|
||||
|
||||
- name: sudoers install
|
||||
package:
|
||||
|
Loading…
Reference in New Issue
Block a user