Fix librewolf installation for Debian

This commit is contained in:
flyingscorpio@clevo 2022-07-01 23:50:24 +02:00
parent 70708cd837
commit 754204d6a4
3 changed files with 48 additions and 24 deletions

View file

@ -0,0 +1 @@
deb [arch=amd64] http://deb.librewolf.net $distro main

View file

@ -0,0 +1,5 @@
---
- name: Update apt cache
become: true
apt:
update_cache: true

View file

@ -1,4 +1,6 @@
---
- name: Install librewolf (Archlinux)
block:
- name: Clone librewolf (Archlinux)
git:
repo: https://aur.archlinux.org/librewolf-bin.git
@ -6,21 +8,37 @@
clone: true
update: false
version: master
when: ansible_facts['distribution'] == 'Archlinux'
- name: Add gpg key for librewolf
- name: Add gpg key for librewolf (Archlinux)
command: gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 031F7104E932F7BD7416E7F6D2845E1305D6E801
when: ansible_facts['distribution'] == 'Archlinux'
register: result
changed_when: "'unchanged: 1' not in result.stderr"
- name: Make and install librewolf (Archlinux)
command:
cmd: makepkg -cirs --needed
chdir: ~/builds/librewolf-bin
stdin: Y
when: ansible_facts['distribution'] == 'Archlinux'
register: result
changed_when: "'installing existing package' not in result.stderr"
when: ansible_facts['distribution'] == 'Archlinux'
- name: Install librewolf (Debian)
block:
- name: Copy librewolf.list (Debian)
become: true
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
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
meta: flush_handlers
- name: Install librewolf (Debian)
become: true
apt: