Simplify the configuration of Firefox
This commit is contained in:
parent
eb59de6d52
commit
3f0d96167d
|
@ -4,3 +4,4 @@
|
|||
- role: desktop
|
||||
vars_files:
|
||||
- "roles/desktop/vars/{{ ansible_system|lower }}.yaml"
|
||||
- "roles/desktop/vars/firefox.yaml"
|
||||
|
|
|
@ -14,8 +14,11 @@
|
|||
tags:
|
||||
- config
|
||||
- firefox
|
||||
set_fact:
|
||||
profile_path: "{{ firefox_path }}/{{ lookup('ini', 'Path section=Profile0 file=' + firefox_path + '/profiles.ini') }}"
|
||||
block:
|
||||
- set_fact:
|
||||
profile_path: "{{ firefox_path }}/{{ lookup('ini', 'Path section=Profile0 file=' + firefox_path + '/profiles.ini') }}"
|
||||
- set_fact:
|
||||
userconfig_path: "{{ profile_path }}/user.js"
|
||||
|
||||
- name: 'Firefox: Lockdown config (relaxed)'
|
||||
tags:
|
||||
|
@ -25,27 +28,28 @@
|
|||
- name: 'Firefox: Download lockdown (relaxed) config'
|
||||
get_url:
|
||||
url: 'https://raw.githubusercontent.com/pyllyukko/user.js/relaxed/user.js'
|
||||
dest: "{{ profile_path }}/user.js-lockdown"
|
||||
dest: "{{ userconfig_path }}-lockdown"
|
||||
mode: '0600'
|
||||
force: yes
|
||||
backup: yes
|
||||
backup: no
|
||||
|
||||
- name: 'Firefox: Replace user.js'
|
||||
copy:
|
||||
src: "{{ profile_path }}/user.js-lockdown"
|
||||
dest: "{{ profile_path }}/user.js"
|
||||
src: "{{ userconfig_path }}-lockdown"
|
||||
dest: "{{ userconfig_path }}"
|
||||
mode: '0600'
|
||||
force: yes
|
||||
backup: yes
|
||||
backup: no
|
||||
|
||||
- name: 'Firefox: Relaxing further'
|
||||
- name: 'Firefox: Tweaking config'
|
||||
tags:
|
||||
- config
|
||||
- firefox
|
||||
block:
|
||||
- name: 'Firefox: Allow searching from URL bar'
|
||||
- name: 'Firefox: Modifying user.js'
|
||||
lineinfile:
|
||||
path: "{{ profile_path }}/user.js"
|
||||
path: "{{ userconfig_path }}"
|
||||
state: present
|
||||
regexp: 'keyword\.enabled'
|
||||
line: 'user_pref("keyword.enabled", true);'
|
||||
regexp: "{{ item.name | regex_replace('\\.', '\\.') }}"
|
||||
line: "user_pref(\"{{ item.name }}\", {{ item.value }});"
|
||||
loop: "{{ firefox_user_prefs }}"
|
||||
|
|
7
.ansible/roles/desktop/vars/firefox.yaml
Normal file
7
.ansible/roles/desktop/vars/firefox.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
firefox_user_prefs:
|
||||
- name: 'keyword.enabled'
|
||||
value: "true"
|
||||
- name: 'network.cookie.thirdparty.sessionOnly'
|
||||
value: "false"
|
||||
- name: 'privacy.sanitize.pending'
|
||||
value: '"[{\"id\":\"shutdown\",\"itemsToClear\":[\"cache\",\"offlineApps\",\"history\",\"formdata\"],\"options\":{}},{\"id\":\"newtab-container\",\"itemsToClear\":[],\"options\":{}}]"'
|
Loading…
Reference in a new issue