parent
77c1c70cc4
commit
0f9e2dd2a6
@ -0,0 +1,59 @@
|
|||||||
|
---
|
||||||
|
- name: Set up firefox
|
||||||
|
hosts: localhost
|
||||||
|
vars:
|
||||||
|
uid: "{{ lookup('env','USER') }}"
|
||||||
|
host_app_url: https://github.com/passff/passff-host/releases/latest/download/install_host_app.sh
|
||||||
|
key_path: /usr/share/keyrings/librewolf.gpg
|
||||||
|
key_url: https://deb.librewolf.net/keyring.gpg
|
||||||
|
connection: local
|
||||||
|
become: false
|
||||||
|
tasks:
|
||||||
|
- name: Have key allready installed
|
||||||
|
stat:
|
||||||
|
path: '{{key_path}}'
|
||||||
|
register: key
|
||||||
|
- name: Get key
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: wget {{ key_url }}
|
||||||
|
creates: /tmp/keyring.gpg
|
||||||
|
when: not key.stat.exists
|
||||||
|
- name: Dearmor key
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: gpg --dearmor -o {{ key_path }} ./keyring.gpg
|
||||||
|
creates: '{{key_path}}'
|
||||||
|
become: true
|
||||||
|
when: not key.stat.exists
|
||||||
|
- name: install repo
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: ../templates/librewolf.sources.j2
|
||||||
|
dest: /etc/apt/sources.list.d/librewolf.sources
|
||||||
|
when: not key.stat.exists
|
||||||
|
- name: Install apt package
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
autoclean: true
|
||||||
|
autoremove: true
|
||||||
|
install_recommends: true
|
||||||
|
pkg: [librewolf]
|
||||||
|
state: latest
|
||||||
|
update_cache: true
|
||||||
|
- name: Get host app
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: wget {{ host_app_url }}
|
||||||
|
creates: /tmp/install_host_app.sh
|
||||||
|
when: not key.stat.exists
|
||||||
|
- name: Install host app
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: bash /tmp/install_host_app.sh librewolf
|
||||||
|
when: not key.stat.exists
|
||||||
|
- name: Clean up
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: rm ./install_host_app.sh ./keyring.gpg
|
||||||
|
removes: [/tmp/install_host_app.sh, /tmp/keyring.gpg]
|
||||||
|
when: not key.stat.exists
|
Loading…
Reference in new issue