Import firefox role.

This commit is contained in:
Tom Alexander
2022-10-23 20:49:48 -04:00
parent 87706a8d9c
commit 1365932f43
10 changed files with 68 additions and 0 deletions

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"'