Add pacman role

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-03-21 01:39:03 +01:00
parent f84085a142
commit bfbb228d12
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 33 additions and 0 deletions

View File

@ -17,6 +17,7 @@
roles:
- sudo
- systemd
- pacman
- ntp
- texlive
- xorg

View File

@ -0,0 +1,28 @@
---
- name: Ensure pacman is installed
package:
name:
- pacman
register: pkg_result
retries: 3
until: pkg_result is succeeded
- name: Use Crans mirror
template:
src: pacman.d/mirrorlist.j2
dest: /etc/pacman.d/mirrorlist
owner: root
group: root
mode: 0644
- name: Enable colors and sugar
lineinfile:
regex: "{{ item }}"
line: "{{ item }}"
insertafter: "[options]"
path: /etc/pacman.conf
loop:
- Color
- TotalDownload
- CheckSpace
- ILoveCandy

View File

@ -0,0 +1,4 @@
{{ ansible_header | comment }}
Server = https://ftps.crans.org/archlinux/$repo/os/$arch
Server = http://mirror.crans.org/archlinux/$repo/os/$arch