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