dotfiles/tasks/packages.yml

89 lines
1.8 KiB
YAML
Raw Normal View History

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-02-23 17:48:40 +00:00
when: item not in repo_keys.stdout
- name: Install pacman config
template:
src: ./files/pacman.conf
dest: /etc/pacman.conf
mode: 0644
2021-02-23 17:48:40 +00:00
register: pacman_conf
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
password_lock: true
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
line: "aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman"
2018-09-11 20:43:16 +01:00
create: true
validate: visudo -cf %s
2020-11-25 12:11:10 +00:00
mode: 0644
2021-02-07 14:23:56 +00:00
changed_when: false
2018-09-11 20:43:16 +01:00
- name: Install yay
2018-09-11 20:43:16 +01:00
aur:
2020-07-14 20:58:37 +01:00
name: yay-bin
2018-09-14 09:01:11 +01:00
become: true
become_user: aur_builder
2018-09-12 11:09:40 +01:00
2021-02-23 17:48:40 +00:00
- name: Update package repositories
pacman:
update_cache: yes
become: true
when: added_repo_keys.changed or pacman_conf.changed
- name: Install additional repo keyrings
2018-09-11 20:43:16 +01:00
aur:
name: "{{ item }}"
2018-09-14 09:01:11 +01:00
become: true
become_user: aur_builder
loop:
- archstrike-keyring
- name: Install ccache
2019-05-26 19:00:03 +01:00
aur:
name: ccache
become: true
become_user: aur_builder
- name: Install makepkg tools
aur:
2020-04-04 20:20:57 +01:00
name: "{{ item }}"
become: true
become_user: aur_builder
loop:
- pbzip2
- zstd
2021-02-23 18:24:39 +00:00
- pigz
- name: Install makepkg config
template:
src: ./files/makepkg.conf
dest: /etc/makepkg.conf
mode: 0644
2021-02-23 18:16:27 +00:00
- name: Install pacman tools
aur:
name: pacman-contrib
become: true
become_user: aur_builder