system/tasks/pacman.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

43 lines
1.2 KiB
YAML

---
- name: Configure pacman color
ansible.builtin.replace:
dest: /etc/pacman.conf
regexp: ^#(Color)"
replace: \1"
become: true
- name: Configure more pacman visuals
ansible.builtin.replace:
dest: /etc/pacman.conf
regexp: "#(VerbosePkgLists)"
replace: \1\nILoveCandy"
become: true
- name: Configure pacman multilib repo
become: true
ansible.builtin.replace:
dest: /etc/pacman.conf
regexp: ^#(\[multilib\])\n^#(.*)$"
replace: \1\n\2"
notify: Update_pacman_repos
when: ansible_architecture == "x86_64"
- name: Add local repo to mirrorlist
become: true
ansible.builtin.lineinfile:
path: /etc/pacman.d/mirrorlist
line: "Server= {{ system_arch_local_mirror }}/$repo/os/$arch"
state: present
insertbefore: BOF
when: system_arch_local_mirror
- name: Stat ca-certificates
ansible.builtin.stat:
path: "/etc/ssl/certs/ca-certificates.crt" # required. The full path of the file/object to get the facts of.
register: cacertificates
- name: Reinstall certificate for old system
ansible.builtin.command: "pacman -Sy ca-certificates-utils openssl --noconfirm"
become: true
when: not cacertificates.stat.exists