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