add flatpak option for firefox

This commit is contained in:
Matthew Stobbs
2025-09-04 18:00:15 -06:00
parent 9598ba87d2
commit 6662db25db
3 changed files with 24 additions and 1 deletions

6
tasks/config/firefox.yml Normal file
View File

@@ -0,0 +1,6 @@
# vim: set filetype=yaml.ansible :
---
- name: Load firefox pkgconfig
ansible.bulitin.set_fact:
firefox:
method: "{{ pkgconfig.firefox.method[ansible_os_family] | default(pkgconfig.firefox.method.default) }}"

View File

@@ -1,11 +1,21 @@
# vim: set filetype=yaml.ansible : # vim: set filetype=yaml.ansible :
--- ---
- name: Load firefox config
ansible.builtin.include_tasks:
file: config/firefox.yml
- name: Append firefox to pkg_sys - name: Append firefox to pkg_sys
when: when:
- ansible_system == 'Linux' - firefox.method == 'sys'
ansible.builtin.set_fact: ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['firefox'] }}" pkg_sys: "{{ pkg_sys + ['firefox'] }}"
- name: Install firefox as flatpak
when:
- firefox.method == 'flatpak'
ansible.builtin.set_fact:
pkg_flatpak: "{{ pkg_sys + ['org.mozilla.firefox'] }}"
- name: Append firefox to pkg_cask - name: Append firefox to pkg_cask
when: when:
- ansible_system == 'Darwin' - ansible_system == 'Darwin'

7
vars/pkgs/firefox.yml Normal file
View File

@@ -0,0 +1,7 @@
# vim: set filetype=yaml.ansible :
---
firefox:
method:
default: sys
RedHat: flatpak
Darwin: cask