setup-cockpit/roles/librewolf/tasks/main.yml

51 lines
1.7 KiB
YAML

---
- name: Install librewolf (Archlinux)
when: ansible_facts['distribution'] == 'Archlinux'
block:
- name: Clone librewolf (Archlinux)
ansible.builtin.git:
repo: https://aur.archlinux.org/librewolf-bin.git
dest: ~/builds/librewolf-bin
clone: true
update: false
version: master
- name: Add gpg key for librewolf (Archlinux)
ansible.builtin.command: gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 031F7104E932F7BD7416E7F6D2845E1305D6E801
register: result
changed_when: "'unchanged: 1' not in result.stderr"
- name: Make and install librewolf (Archlinux)
ansible.builtin.command:
cmd: makepkg -cirs --needed
chdir: ~/builds/librewolf-bin
stdin: Y
register: result
changed_when: "'installing existing package' not in result.stderr"
- name: Install librewolf (Debian)
when: ansible_facts['distribution'] == 'Debian'
block:
- name: Copy librewolf.list (Debian)
become: true
ansible.builtin.copy:
src: librewolf.list
dest: /etc/apt/sources.list.d/librewolf.list
mode: 0644
notify: Update apt cache
- name: Add gpg key for librewolf (Debian)
become: true
ansible.builtin.get_url:
url: https://deb.librewolf.net/keyring.gpg
dest: /etc/apt/trusted.gpg.d/librewolf.gpg
mode: 0644
notify: Update apt cache
- name: Flush handlers
ansible.builtin.meta: flush_handlers
- name: Install librewolf (Debian)
become: true
ansible.builtin.apt:
name:
- librewolf
- name: Open addon pages for installation
ansible.builtin.command: "librewolf {{ lookup('file', 'addons.txt') }}"
changed_when: false