summaryrefslogtreecommitdiffstats
path: root/roles/firefox/tasks/main.yml
blob: 02aa22438ffaaf33d4edbd3266d88d44909cddf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- name: "Include OS-specific variables"
  ansible.builtin.include_vars: "{{ ansible_facts['os_family'] | lower }}.yml"

- name: "Include OS-specific tasks"
  ansible.builtin.include_tasks: "install-{{ ansible_facts['os_family'] | lower }}.yml"

- name: "Install browserpass extension for Firefox"
  ansible.builtin.include_tasks: "install-plugin-browserpass.yml"
  when: firefox_install_browserpass | default(false)

# NOTE: passff extension is using sed/curl during install and python/pass to run
# Make sure those dependencies are installed on the target system before enabling this part.
# It doesn't make a lot of sense to have all these dependencies added to the firefox role, just for using
# this extension, which isn't enabled by default.
# Personally I find it has better UI/UX than browserpass, but browserpass is more lightweight.
- name: "Install passff extension for Firefox"
  ansible.builtin.include_tasks: "install-plugin-passff.yml"
  when: firefox_install_passff | default(false)

- name: "Create policies directory"
  become: true
  ansible.builtin.file:
    path: "/etc/firefox/policies"
    state: "directory"
    mode: "0755"

- name: "Set firefox_policies fact"
  ansible.builtin.set_fact:
    firefox_policies: "{{ firefox_default_policies | combine(firefox_policies_override) }}"

- name: "Create Firefox policies file"
  become: true
  ansible.builtin.copy:
    dest: "/etc/firefox/policies/policies.json"
    mode: "0644"
    content: |
      {
        "policies": {{ firefox_policies | tojson(indent=4) }}
      }