78 lines
3.0 KiB
YAML
78 lines
3.0 KiB
YAML
- name: upgrade arch-keyring
|
|
pacman:
|
|
state: latest # not required. choices: absent;latest;present. Desired state of the package.
|
|
name: archlinux-keyring
|
|
force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
|
|
update_cache: false
|
|
become: yes
|
|
when: system_upgrade and ansible_facts['os_family'] == "Archlinux"
|
|
|
|
- name: upgrade system
|
|
pacman:
|
|
state: latest # not required. choices: absent;latest;present. Desired state of the package.
|
|
upgrade: true # not required. Whether or not to upgrade whole system.
|
|
force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
|
|
update_cache: false
|
|
become: yes
|
|
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: yes
|
|
|
|
- name: launch arch base install software
|
|
pacman:
|
|
state: present # not required. choices: absent;latest;present. Desired state of the package.
|
|
name: "{{system_base_softwares_arch}}"
|
|
become: yes
|
|
when: ansible_facts['os_family'] == "Archlinux"
|
|
|
|
- name: install aur workstation soft
|
|
aur:
|
|
name: "{{ system_base_aur_soft }}"
|
|
state: present
|
|
become: yes
|
|
become_user: aur_builder
|
|
when: ansible_facts['os_family'] == "Archlinux"
|
|
|
|
- name: launch debian base install software
|
|
apt:
|
|
state: present # not required. choices: absent;latest;present. Desired state of the package.
|
|
name: "{{system_base_softwares_debian}}"
|
|
update_cache: yes
|
|
become: yes
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
- name: GITHUB | Get current version of bat
|
|
shell: >
|
|
warn=False
|
|
curl --silent https://github.com/sharkdp/bat/releases/latest |
|
|
grep 'tag' |
|
|
sed -E 's/.*v([0-9].[0-9][0-9].[0-9]).*/\1/'
|
|
register: bat_version
|
|
failed_when: >
|
|
bat_version.rc != 0 or
|
|
not bat_version.stdout|regex_search('\w+\.\w+\.\w+')
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
- name: DEBIAN | Set URL to download bins
|
|
set_fact:
|
|
debian_url: "https://github.com/sharkdp/bat/releases/download/v{{ bat_version.stdout }}/bat_{{ bat_version.stdout }}_amd64.deb"
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
- name: DEBIAN | Install deb from github
|
|
become: true
|
|
apt:
|
|
deb: "{{debian_url}}"
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
- name: pass user shell to zsh
|
|
user:
|
|
name: "{{user.name}}" # required. Name of the user to create, remove or modify.
|
|
shell: /bin/zsh # not required. Optionally set the user's shell.,On macOS, before version 2.5, the default shell for non-system users was /usr/bin/false. Since 2.5, the default shell for non-system users on macOS is /bin/bash.
|
|
state: present # not required. choices: absent;present. Whether the account should exist or not, taking action if the state is different from what is stated.
|
|
become: yes
|