From c91c84c29bbd4883a2c7003f237c48a33542e4c9 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Thu, 3 Oct 2019 15:15:29 +0100 Subject: [PATCH] Add config for Firefox --- roles/home/files/user.js | 2 ++ roles/home/tasks/firefox.yml | 10 ++++++++++ roles/home/tasks/main.yml | 1 + 3 files changed, 13 insertions(+) create mode 100644 roles/home/files/user.js create mode 100644 roles/home/tasks/firefox.yml diff --git a/roles/home/files/user.js b/roles/home/files/user.js new file mode 100644 index 0000000..1b6ecb6 --- /dev/null +++ b/roles/home/files/user.js @@ -0,0 +1,2 @@ +user_pref("browser.startup.homepage", "about:blank"); +user_pref("browser.newtabpage.enabled", false); diff --git a/roles/home/tasks/firefox.yml b/roles/home/tasks/firefox.yml new file mode 100644 index 0000000..9225e5c --- /dev/null +++ b/roles/home/tasks/firefox.yml @@ -0,0 +1,10 @@ +--- +- name: Check for profiles.ini + stat: + path: "{{ ansible_env.HOME }}/.mozilla/firefox/profiles.ini" + register: profile_ini +- name: Get Firefox profile name + copy: + src: user.js + dest: "{{ ansible_env.HOME }}/.mozilla/firefox/{{ lookup('ini', 'Path section=Profile0 file={{ ansible_env.HOME }}/.mozilla/firefox/profiles.ini') }}/user.js" + when: profile_ini.stat.exists diff --git a/roles/home/tasks/main.yml b/roles/home/tasks/main.yml index 88ef387..a3030b0 100644 --- a/roles/home/tasks/main.yml +++ b/roles/home/tasks/main.yml @@ -4,3 +4,4 @@ - include: shell.yml - include: emacs.yml - include: mate.yml +- include: firefox.yml