Import firefox role.
This commit is contained in:
parent
87706a8d9c
commit
1365932f43
@ -20,3 +20,4 @@
|
||||
- alacritty
|
||||
- sway
|
||||
- emacs
|
||||
- firefox
|
||||
|
13
ansible/roles/firefox/defaults/main.yaml
Normal file
13
ansible/roles/firefox/defaults/main.yaml
Normal 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: "[]"
|
2
ansible/roles/firefox/meta/main.yaml
Normal file
2
ansible/roles/firefox/meta/main.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- users
|
14
ansible/roles/firefox/tasks/common.yaml
Normal file
14
ansible/roles/firefox/tasks/common.yaml
Normal 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
|
7
ansible/roles/firefox/tasks/freebsd.yaml
Normal file
7
ansible/roles/firefox/tasks/freebsd.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- libfido2
|
||||
- u2f-devd
|
||||
- firefox
|
||||
state: present
|
6
ansible/roles/firefox/tasks/linux.yaml
Normal file
6
ansible/roles/firefox/tasks/linux.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- libfido2
|
||||
- firefox-developer-edition
|
||||
state: present
|
2
ansible/roles/firefox/tasks/main.yaml
Normal file
2
ansible/roles/firefox/tasks/main.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: tasks/common.yaml
|
||||
when: graphics_driver is defined
|
23
ansible/roles/firefox/tasks/peruser.yaml
Normal file
23
ansible/roles/firefox/tasks/peruser.yaml
Normal 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"'
|
0
ansible/roles/firefox/tasks/peruser_freebsd.yaml
Normal file
0
ansible/roles/firefox/tasks/peruser_freebsd.yaml
Normal file
0
ansible/roles/firefox/tasks/peruser_linux.yaml
Normal file
0
ansible/roles/firefox/tasks/peruser_linux.yaml
Normal file
Loading…
x
Reference in New Issue
Block a user