Firebird (Firefox Browser & Thunderbird Mailclient)
This role was created to install Firefox and Thunderbird to jammy_desktop.
General
This role consists of six main steps:
- Uninstalls snap Firefox and Thunderbird
- Only uninstalls snap Firefox and Thunderbird if snap_remove equals false
- Snap_remove checks whether Snap is installed or not. Snap_remove == false → Snap is still installed → therefore remove Snap Firefox and Thunderbird
#snap remove firefox
- name: snap remove firefox
community.general.snap:
name: firefox
state: absent
become: true
when: snap_remove == false
#snap remove thunderbird
- name: snap remove thunderbird
community.general.snap:
name: thunderbird
state: absent
become: true
when: snap_remove == false
- Get apt signing key for Mozilla PPA Repo, use trusted.gpg.d folder as keyring
#if the system is behind a apt proxy the key has to be requested through the proxy aswell
- name: get apt signing key for zabbix Repo over proxy
command: apt-key adv --keyserver-options http-proxy={{proxy_custom}} --keyserver keyserver.ubuntu.com --recv-keys {{Jammy_firebird_mozilla_ppa_key_id}}
become: yes
when: (apt_proxy == true) or (proxy_apt == true)
- name: get apt signing key for Mozilla PPA Repo
apt_key:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{Jammy_firebird_mozilla_ppa_key_id}}
state: present
keyring: /etc/apt/trusted.gpg.d/mozilla-ppa-repo.gpg
become: true
- Adds Mozilla ppa
#add firefox PPA
- name: add firefox PPA
ansible.builtin.apt_repository:
repo: ppa:mozillateam/ppa #new syntax to also fetch gpgp-sining-key
state: present
update_cache: yes
become: true
- Sets high priority for Firefox and Thunderbird installation to added ppa
- Copies a template file called 99mozillateamppa to /etc/apt/preferences.d
#set higher priority for firefox and thunderbird package from this PPA
- name: Copy 99mozillateamppa to /etc/apt/preferences.d to set priority for firefox package from added PPA
template:
src: 99mozillateamppa
dest: /etc/apt/preferences.d/99mozillateamppa
owner: root
group: root
mode: 0644
force: true
when: firefox_conf == true or thunderbird_conf == true
become: true
- Installs Firefox as deb
#install firefox as deb
- name: Install firefox
ansible.builtin.apt:
name: firefox
state: present
when: firefox_conf == true
become: true
- Adds adblock plus to Firefox (opt-in)
- copies folder (the folder name is the ID of the addon found in the manifest.json file) with extracted addon xpi file to /usr/share/mozilla/extensions/.....
#Copy Adblock Plus Addon into Adblock folder
- name: Copy Adblock Plus Addon into Adblock folder
copy:
src: ./{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
dest: /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
owner: root
group: root
mode: 0644
force: true
when: adblock_conf == true
become: true
- Installs Thunderbird as deb
#install thunderbird as deb
- name: Install thunderbird
ansible.builtin.apt:
name: thunderbird
state: present
when: thunderbird_conf == true
become: true
Dependencies
Role Dependencies
Package Dependencies
Role Variables
Name | Type | Default value | Purpose | Comment | Role |
---|---|---|---|---|---|
firefox_conf | Boolean | false | If set to true in inventory file, this variable will install firefox as deb | - | jammy_firebird |
thunderbird_conf | Boolean | false | If set to true in inventory file, this variable will install firefox as deb | - | jammy_firebird |
adblock_conf | Boolean | false | If set to true in inventory file, this variable will add the adblock plus addon to firefox | - | jammy_firebird |
snap_remove | Boolean | true | Indicates if snapd is to be removed or installed | This variable is from the jammy_snap role and under general in this wiki page it is explained on why this variable is used in this role | jammy_snap |
Jammy_firebird_mozilla_ppa_key_id | String | 0AB215679C571D1C8325275B9BDB3D89CE49EC21 | Get apt signing key for Mozilla PPA Repo, use trusted.gpg.d folder as keyring | - | jammy_firebird |
Example Playbook
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
BSD
Author Information
Maintainer: Niels Dill
Support-Contact: s4d-linux-support@id.ethz.ch