2021-02-23 17:48:40 +00:00
|
|
|
- name: Get repository keys
|
|
|
|
shell: pacman-key --list-sigs
|
|
|
|
become: true
|
|
|
|
register: repo_keys
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
- name: Install custom repo keys
|
|
|
|
shell:
|
|
|
|
cmd: pacman-key -r {{ item }} && pacman-key --lsign-key {{ item }}
|
|
|
|
become: true
|
|
|
|
register: added_repo_keys
|
|
|
|
loop:
|
|
|
|
- 8A8F901A # Sublime Text
|
|
|
|
- 9D5F1C051D146843CDA4858BDE64825E7CBC0D51 # ArchStrike
|
2021-02-23 17:50:37 +00:00
|
|
|
- DDF7DB817396A49B2A2723F7403BD972F75D9D76 # archzfs
|
2021-07-01 22:16:25 +01:00
|
|
|
- 3056513887B78AEB # chaotic-AUR
|
2021-02-23 17:48:40 +00:00
|
|
|
when: item not in repo_keys.stdout
|
|
|
|
|
2019-05-27 15:25:46 +01:00
|
|
|
- name: Install pacman config
|
2019-05-27 15:36:57 +01:00
|
|
|
template:
|
2019-05-27 15:25:46 +01:00
|
|
|
src: ./files/pacman.conf
|
|
|
|
dest: /etc/pacman.conf
|
|
|
|
mode: 0644
|
2021-02-23 17:48:40 +00:00
|
|
|
register: pacman_conf
|
2019-05-27 15:25:46 +01:00
|
|
|
|
2019-05-25 16:50:09 +01:00
|
|
|
- name: Create aur_builder user
|
|
|
|
user:
|
2018-09-11 20:43:16 +01:00
|
|
|
name: aur_builder
|
|
|
|
group: wheel
|
2018-10-06 12:50:29 +01:00
|
|
|
password_lock: true
|
2019-10-02 20:49:24 +01:00
|
|
|
shell: /usr/bin/nologin
|
2021-02-07 14:23:56 +00:00
|
|
|
changed_when: false
|
2018-09-11 20:43:16 +01:00
|
|
|
|
2019-05-25 16:50:09 +01:00
|
|
|
- name: Allow aur_builder user to run pacman as root
|
2018-09-14 09:01:11 +01:00
|
|
|
lineinfile:
|
2018-09-11 20:43:16 +01:00
|
|
|
path: /etc/sudoers.d/11-install-aur_builder
|
2020-03-30 19:36:05 +01:00
|
|
|
line: "aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman"
|
2018-09-11 20:43:16 +01:00
|
|
|
create: true
|
2020-03-30 19:36:05 +01:00
|
|
|
validate: visudo -cf %s
|
2023-07-29 11:34:45 +01:00
|
|
|
mode: 0640
|
2021-02-07 14:23:56 +00:00
|
|
|
changed_when: false
|
2018-09-11 20:43:16 +01:00
|
|
|
|
2021-07-01 22:16:25 +01:00
|
|
|
- name: Install chaotic AUR
|
|
|
|
pacman:
|
|
|
|
name: "{{ item }}"
|
|
|
|
become: true
|
|
|
|
loop:
|
|
|
|
- https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst
|
|
|
|
- https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst
|
|
|
|
|
2021-02-23 17:48:40 +00:00
|
|
|
- name: Update package repositories
|
|
|
|
pacman:
|
2023-01-08 15:25:23 +00:00
|
|
|
update_cache: true
|
2021-02-23 17:48:40 +00:00
|
|
|
become: true
|
|
|
|
when: added_repo_keys.changed or pacman_conf.changed
|
|
|
|
|
2023-07-29 21:46:06 +01:00
|
|
|
- name: Install paru
|
2021-11-07 00:45:19 +00:00
|
|
|
kewlfft.aur.aur:
|
2023-07-29 21:46:06 +01:00
|
|
|
name: paru
|
2021-07-01 22:17:51 +01:00
|
|
|
become: true
|
|
|
|
become_user: aur_builder
|
|
|
|
|
2023-07-29 21:46:06 +01:00
|
|
|
- name: Install paru config
|
|
|
|
template:
|
|
|
|
src: ./files/paru.conf
|
|
|
|
dest: /etc/paru.conf
|
|
|
|
mode: 0644
|
|
|
|
|
2020-03-30 19:36:05 +01:00
|
|
|
- name: Install additional repo keyrings
|
2021-11-07 00:45:19 +00:00
|
|
|
kewlfft.aur.aur:
|
2018-09-11 20:43:16 +01:00
|
|
|
name: "{{ item }}"
|
2018-09-14 09:01:11 +01:00
|
|
|
become: true
|
|
|
|
become_user: aur_builder
|
2019-12-09 21:09:00 +00:00
|
|
|
loop:
|
2020-04-15 08:50:11 +01:00
|
|
|
- archstrike-keyring
|
2019-05-25 00:06:02 +01:00
|
|
|
|
2020-03-30 19:36:05 +01:00
|
|
|
- name: Install ccache
|
2021-11-07 00:45:19 +00:00
|
|
|
kewlfft.aur.aur:
|
2019-05-26 19:00:03 +01:00
|
|
|
name: ccache
|
|
|
|
become: true
|
|
|
|
become_user: aur_builder
|
|
|
|
|
2020-03-30 19:36:05 +01:00
|
|
|
- name: Install makepkg tools
|
2021-11-07 00:45:19 +00:00
|
|
|
kewlfft.aur.aur:
|
2020-04-04 20:20:57 +01:00
|
|
|
name: "{{ item }}"
|
2019-12-19 08:40:48 +00:00
|
|
|
become: true
|
|
|
|
become_user: aur_builder
|
|
|
|
loop:
|
|
|
|
- pbzip2
|
|
|
|
- zstd
|
2021-02-23 18:24:39 +00:00
|
|
|
- pigz
|
2019-12-19 08:40:48 +00:00
|
|
|
|
2020-03-30 19:36:05 +01:00
|
|
|
- name: Install makepkg config
|
2019-12-19 08:40:48 +00:00
|
|
|
template:
|
|
|
|
src: ./files/makepkg.conf
|
2020-03-30 19:36:05 +01:00
|
|
|
dest: /etc/makepkg.conf
|
2019-12-19 08:40:48 +00:00
|
|
|
mode: 0644
|
2021-02-23 18:16:27 +00:00
|
|
|
|
|
|
|
- name: Install pacman tools
|
2021-11-07 00:45:19 +00:00
|
|
|
kewlfft.aur.aur:
|
2023-07-29 19:24:06 +01:00
|
|
|
name: "{{ item }}"
|
|
|
|
loop:
|
|
|
|
- pacman-contrib
|
|
|
|
- reflector
|
2021-02-23 18:16:27 +00:00
|
|
|
become: true
|
|
|
|
become_user: aur_builder
|
2023-07-29 19:24:06 +01:00
|
|
|
|
|
|
|
- name: Install reflector config
|
|
|
|
template:
|
|
|
|
src: ./files/reflector.conf
|
|
|
|
dest: /etc/xdg/reflector/reflector.conf
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
- name: Enable reflector
|
|
|
|
systemd:
|
|
|
|
name: reflector
|
|
|
|
enabled: true
|