system/tasks/base_software.yml
vincent 1419eaa003
All checks were successful
continuous-integration/drone/push Build is passing
style: correct ansible lint
2022-12-10 20:25:54 +01:00

64 lines
1.7 KiB
YAML

- name: Upgrade arch-keyring
community.general.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
community.general.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
ansible.builtin.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
community.general.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
ansible.builtin.apt:
state: present
name: "{{ system_base_softwares }}"
update_cache: true
become: true
when: ansible_facts['os_family'] == "Debian"
- name: Launch redhat base install software
ansible.builtin.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