From 3993f9b3bff06cd532fe9d1053086a5fba7d783d Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Thu, 23 Nov 2017 20:27:53 +0000 Subject: [PATCH] Add Firefox configuration. --- .ansible/roles/mac_desktop/tasks/prefs.yaml | 37 ++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.ansible/roles/mac_desktop/tasks/prefs.yaml b/.ansible/roles/mac_desktop/tasks/prefs.yaml index 67c5f08..67089ce 100644 --- a/.ansible/roles/mac_desktop/tasks/prefs.yaml +++ b/.ansible/roles/mac_desktop/tasks/prefs.yaml @@ -1,2 +1,37 @@ -- name: Clear preferences cache +- name: 'Firefox: Set base path' + set_fact: + firefox_path: '~/Library/Application Support/Firefox' + +- name: 'Firefox: Find profile path' + set_fact: + profile_path: "{{ lookup('ini', 'Path section=Profile0 file=' + firefox_path + '/profiles.ini') }}" + +- name: 'Firefox: Add local config' + copy: + content: | + user_pref("privacy.firstparty.isolate", true); + user_pref("privacy.resistFingerprinting", true); + user_pref("privacy.trackingprotection.enabled", true); + user_pref("browser.cache.offline.enable", false); + user_pref("browser.safebrowsing.malware.enabled", false); + user_pref("browser.safebrowsing.phishing.enabled", false); + user_pref("browser.send_pings", false); + user_pref("browser.sessionstore.max_tabs_undo", 0); + user_pref("browser.urlbar.speculativeConnect.enabled", false); + user_pref("dom.battery.enabled", false); + user_pref("dom.event.clipboardevents.enabled", false); + user_pref("geo.enabled", false); + user_pref("media.navigator.enabled", false); + user_pref("network.cookie.cookieBehavior", 1); + // user_pref("network.cookie.lifetimePolicy", 2); + user_pref("network.http.referer.trimmingPolicy", 2); + user_pref("network.http.referer.XOriginPolicy", 2); + user_pref("network.http.referer.XOriginTrimmingPolicy", 2); + user_pref("privacy.window.maxInnerWidth", 1400); + user_pref("privacy.window.maxInnerHeight", 900); + user_pref("webgl.disabled", true); + dest: "{{ firefox_path }}/{{ profile_path }}/user.js" + mode: 0440 + +- name: 'OS X: Clear preferences cache' command: pkill -u ${USER} cfprefsd