dotfiles/tasks/packages.yml

113 lines
2.3 KiB
YAML
Raw Normal View History

2019-11-18 13:09:43 +00:00
- name: Define keys for pacman
set_fact:
2018-10-10 20:01:27 +01:00
keys:
- 1EDDE2CDFC025D17F6DA9EC0ADAE6AD28A8F901A # Sublime Text
- 9D5F1C051D146843CDA4858BDE64825E7CBC0D51 # ArchStrike
2019-01-06 19:24:43 +00:00
- name: Install pacman config
template:
src: ./files/pacman.conf
dest: /etc/pacman.conf
mode: 0644
- name: Add keys to pacman
shell: pacman-key -r {{ item }}
loop: "{{ keys }}"
2018-10-10 20:01:27 +01:00
- name: Sign keys in pacman
shell: pacman-key --lsign-key {{ item }}
loop: "{{ keys }}"
2018-10-10 20:01:27 +01:00
- name: Add keys to local keyring
shell: gpg --recv-keys {{ item }}
become: true
become_user: "{{ user }}"
loop: "{{ keys }}"
- name: Add tor browser key
shell: gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
2020-04-04 20:50:27 +01:00
become: true
become_user: "{{ user }}"
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
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
2018-09-11 20:43:16 +01:00
- name: Get installed packages
shell: pacman -Qq
2019-01-06 18:51:35 +00:00
become: true
become_user: aur_builder
register: installed_packages
2019-03-14 21:34:29 +00:00
- name: Install yay
2018-09-11 20:43:16 +01:00
aur:
skip_installed: true
name: yay
2018-09-14 09:01:11 +01:00
become: true
become_user: aur_builder
2018-09-12 11:09:40 +01:00
- name: Install additional repo keyrings
2018-09-11 20:43:16 +01:00
aur:
skip_installed: true
name: "{{ item }}"
2018-09-14 09:01:11 +01:00
become: true
become_user: aur_builder
when: item not in installed_packages.stdout_lines
loop:
- archstrike-keyring
- name: Install ccache
2019-05-26 19:00:03 +01:00
aur:
skip_installed: true
name: ccache
become: true
become_user: aur_builder
- name: Install makepkg tools
aur:
skip_installed: true
2020-04-04 20:20:57 +01:00
name: "{{ item }}"
become: true
become_user: aur_builder
when: item not in installed_packages.stdout_lines
loop:
- pbzip2
- zstd
- name: Install makepkg config
template:
src: ./files/makepkg.conf
dest: /etc/makepkg.conf
mode: 0644
2019-05-25 11:26:09 +01:00
- name: Install Reflector
2019-10-06 16:32:35 +01:00
aur:
skip_installed: true
name: reflector
become: true
become_user: aur_builder
- name: Install Reflector service
template:
src: ./files/reflector.service
dest: /etc/systemd/system/reflector.service
mode: 0644
owner: root
group: root
- name: Enable Reflector services
systemd:
name: reflector
2019-10-06 16:32:35 +01:00
enabled: true