The goal of this project is to automatically install and configure firefox according to a users preferences. Created this project before I discovered this one: https://github.com/alzadude/ansible-firefox
An inventory file with an entry for desktop should exist. I use this project to spin up an Ubuntu desktop in EC2 using terraform: https://github.com/bbux-aws/aws-packer-terraform-ansible. This also generates and inventory file that will work with this project.
os_type: 'ubuntu'
No Dependencies
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: desktop
roles:
- role: firefox
Set your custom list of preference and reference them with
ansible-playbook main.yml --extra-vars "@/path/to/firefox_prefs.yml"
# also this works
ansible-playbook main.yml -e @/path/to/firefox_prefs.yml
/path/to/firefox_prefs.yml should have the format:
firefox:
prefs:
- { name: browser.tabs.warnOnClose, value: false }
- { name: geo.enabled, value: false }
Extract existing prefs:
sed 's/user_pref("\(.*\)",\(.*\));/ - { name: \1, value:\2 }/g' \
~/.mozilla/firefox/*.default*/prefs.js > /path/to/firefox_prefs.yml
Apache2