Merge branch 'firefox'

This commit is contained in:
Tom Alexander 2022-10-23 21:18:20 -04:00
commit f29b1a26d6
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
10 changed files with 68 additions and 0 deletions

View File

@ -20,3 +20,4 @@
- alacritty
- sway
- emacs
- firefox

View File

@ -0,0 +1,13 @@
firefox_config:
identity.sync.tokenserver.uri: "https://ffsync.fizz.buzz/token/1.0/sync/1.5"
media.ffmpeg.vaapi.enabled: true
doh-rollout.doorhanger-decision: "UIDisabled"
dom.security.https_only_mode: true
dom.security.https_only_mode_ever_enabled: true
extensions.activeThemeID: "firefox-compact-dark@mozilla.org"
# Disable ads
extensions.pocket.enabled: false
browser.newtabpage.activity-stream.showSponsored: false
browser.newtabpage.activity-stream.showSponsoredTopSites: false
browser.newtabpage.activity-stream.feeds.section.topstories: false
browser.newtabpage.pinned: "[]"

View File

@ -0,0 +1,2 @@
dependencies:
- users

View File

@ -0,0 +1,14 @@
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"'
- include_tasks:
file: tasks/peruser.yaml
apply:
become: yes
become_user: "{{ initialize_user }}"
loop: "{{ users | dict2items | community.general.json_query('[?value.initialize==`true`].key') }}"
loop_control:
loop_var: initialize_user

View File

@ -0,0 +1,7 @@
- name: Install packages
package:
name:
- libfido2
- u2f-devd
- firefox
state: present

View File

@ -0,0 +1,6 @@
- name: Install packages
package:
name:
- libfido2
- firefox-developer-edition
state: present

View File

@ -0,0 +1,2 @@
- import_tasks: tasks/common.yaml
when: graphics_driver is defined

View File

@ -0,0 +1,23 @@
- include_role:
name: per_user
- name: Find firefox about:config file
find:
paths: "{{ account_homedir.stdout }}/.mozilla/firefox/"
patterns: "prefs.js"
recurse: true
depth: 2
register: firefox_about_config
- name: Configure Firefox about:config
lineinfile:
path: "{{ item[0].path }}"
regexp: '"{{ item[1].key }}", [^")\n]*\)'
line: 'user_pref("{{ item[1].key }}", {{ item[1].value | to_json }});'
loop: "{{ firefox_about_config.files | product(firefox_config | dict2items) | list }}"
- import_tasks: tasks/peruser_freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/peruser_linux.yaml
when: 'os_flavor == "linux"'