customize-xfce-anisble/playbook/roles/role-one/tasks/customize-firefox.yml
swapnil 0c729f122c Updated firefox customization
- Get default profile and add user.js
2022-03-22 20:37:29 +05:30

34 lines
961 B
YAML

---
- name: Customize Firefox | Check if Firefox is installed
command: "which firefox"
register: firefox_check
ignore_errors: yes
- name: Customize Firefox | Run firefox - Make sure its initialised
shell:
cmd: "nohup firefox &"
when: firefox_check.rc == 0
- name: Customize Firefox | Close firefox if it's running
shell:
cmd: "pkill firefox"
ignore_errors: true
when: firefox_check.rc == 0
- name: Customize Firefox | Run Firefox Tweaks
shell: "cd {{ home_directory }}/Downloads/WhiteSur-gtk-theme/ && ./tweaks.sh -f"
when: firefox_check.rc == 0
- name: Customize Firefox | Get the name of default profile
shell:
cmd: "ls ~/.mozilla/firefox/ | grep 'default-release'"
register: firefox_profile
when: firefox_check.rc == 0
- name: Customize Firefox | Place user.js in profile
copy:
src: user.js
dest: "{{ home_directory }}/.mozilla/firefox/{{ firefox_profile.stdout }}/user.js"
when: firefox_check.rc == 0