firefox/firefox.yml

65 lines
2.1 KiB
YAML
Raw Normal View History

2022-07-12 16:09:57 +02:00
- name: Firefox setup
2022-07-12 15:08:28 +02:00
hosts: all
tasks:
2022-07-12 16:09:57 +02:00
- name: Install Firefox
apt:
name:
- firefox
2022-08-02 16:41:18 +02:00
# - firefox-locale-de
2022-07-25 14:39:36 +02:00
- name: Install Flatpaks
community.general.flatpak:
name:
- io.gitlab.librewolf-community
2022-07-12 16:09:57 +02:00
- name: create LibreWolf /etc/librewolf/policies dir structure
file:
path: /etc/librewolf/policies
state: directory
2022-07-12 15:08:28 +02:00
- name: Firefox policy
2022-07-12 16:08:38 +02:00
ansible.builtin.copy:
src: policies.json
2022-12-21 22:27:55 +01:00
dest: "{{ item }}"
2022-07-12 15:08:28 +02:00
owner: root
group: root
2022-07-12 16:08:38 +02:00
mode: '0444'
2022-07-12 16:55:25 +02:00
backup: yes
2022-08-08 17:14:05 +02:00
with_items:
- "/usr/lib/firefox/distribution/policies.json"
2022-12-21 22:27:55 +01:00
- "/etc/librewolf/policies/policies.json"
2022-12-21 22:51:33 +01:00
2022-12-21 23:00:19 +01:00
- name: Get sha256
shell: wget -q https://gitlab.com/api/v4/projects/24386000/packages/generic/librewolf/latest/LibreWolf.x86_64.AppImage.sha256 -O - | cut -d" " -f1
2022-12-21 22:51:33 +01:00
register: command_output
- set_fact:
2022-12-21 22:53:07 +01:00
librewolf_sha256: "{{ command_output.stdout }}"
2022-12-21 22:27:55 +01:00
- name: Download LibreWolf as Appimage (flatpak ignores policies.json)
ansible.builtin.get_url:
url: https://gitlab.com/api/v4/projects/24386000/packages/generic/librewolf/latest/LibreWolf.x86_64.AppImage
dest: /usr/local/bin/librewolf
2022-12-21 22:51:33 +01:00
checksum: sha256:{{ librewolf_sha256 }}
2022-12-21 22:27:55 +01:00
mode: "0555"
2022-07-12 16:55:25 +02:00
- name: /usr/local/sbin/autoupdate.d/video-download-helper.update
blockinfile:
path: /usr/local/sbin/autoupdate.d/video-download-helper.update
mode: "0400"
owner: root
group: root
create: yes
marker: "# {mark} ANSIBLE MANAGED BLOCK"
block: |
wget $(curl -s https://api.github.com/repos/mi-g/vdhcoapp/releases/latest | jq -r '.assets[]' | egrep "\"browser_download_url\": .+_amd64.deb" | head -n1 | cut -d"\"" -f4) -O /tmp/vdh.deb
dpkg -i /tmp/vdh.deb
rm /tmp/vdh.deb
backup: yes
validate: /bin/bash -n %s
- name: Install video-download-helper
command: bash -e /usr/local/sbin/autoupdate.d/video-download-helper.update
args:
creates: /opt/net.downloadhelper.coapp