Add pacman role
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
f84085a142
commit
bfbb228d12
28
roles/pacman/tasks/main.yml
Normal file
28
roles/pacman/tasks/main.yml
Normal 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
|
4
roles/pacman/templates/pacman.d/mirrorlist.j2
Normal file
4
roles/pacman/templates/pacman.d/mirrorlist.j2
Normal 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
|
Loading…
Reference in New Issue
Block a user