system/tasks/base_software.yml
vincent dcac7dae39
Some checks failed
continuous-integration/drone/push Build is failing
correct bat issue and dedicated file
2022-11-19 19:05:14 +01:00

64 lines
1.6 KiB
YAML

- name: upgrade arch-keyring
pacman:
state: latest # noqa package-latest
name: archlinux-keyring
force: true
update_cache: false
become: true
when: system_upgrade and ansible_facts['os_family'] == "Archlinux"
- name: upgrade system
pacman:
state: latest # noqa package-latest
upgrade: true
force: true
update_cache: false
become: true
when: system_upgrade and ansible_facts['os_family'] == "Archlinux"
register: upgrade
- name: Reboot updates to apply
reboot:
reboot_timeout: 3600
when: upgrade.changed and "linux" in upgrade.packages and system_upgrade and ansible_facts['os_family'] == "Archlinux"
become: true
- name: launch arch base install software
pacman:
state: present
name: "{{ system_base_softwares }}"
become: true
when: ansible_facts['os_family'] == "Archlinux"
- name: install aur workstation soft
aur:
name: "{{ system_base_aur_soft }}"
state: present
become: true
become_user: aur_builder
when: ansible_facts['os_family'] == "Archlinux" and system_base_aur_soft
- name: launch debian base install software
apt:
state: present
name: "{{ system_base_softwares }}"
update_cache: true
become: true
when: ansible_facts['os_family'] == "Debian"
- name: launch redhat base install software
dnf:
state: present
name: "{{ system_base_softwares }}"
update_cache: true
become: true
when: ansible_facts['os_family'] == "RedHat"
#- name: pass user shell to zsh
# user:
# name: "{{ user.name }}"
# shell: /bin/zsh
# state: present
# when: ansible_facts['os_family'] != "RedHat"
# become: true