refactor: flatpak management goes both ways now
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 38s
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 38s
This commit is contained in:
parent
4a8be91d6a
commit
d760f00a82
@ -4,11 +4,14 @@
|
|||||||
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
|
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Install Flatpak applications
|
- name: Get list of installed Flatpaks
|
||||||
community.general.flatpak:
|
command: flatpak list --app --columns=application
|
||||||
name: "{{ item }}"
|
register: installed_flatpaks
|
||||||
state: present
|
changed_when: false
|
||||||
loop:
|
|
||||||
|
- name: Define desired Flatpaks
|
||||||
|
set_fact:
|
||||||
|
desired_flatpaks:
|
||||||
- org.fkoehler.KTailctl
|
- org.fkoehler.KTailctl
|
||||||
- org.mozilla.Thunderbird
|
- org.mozilla.Thunderbird
|
||||||
- io.github.kukuruzka165.materialgram
|
- io.github.kukuruzka165.materialgram
|
||||||
@ -47,3 +50,15 @@
|
|||||||
- io.github.nokse22.Exhibit
|
- io.github.nokse22.Exhibit
|
||||||
- net.nokyan.Resources
|
- net.nokyan.Resources
|
||||||
- dev.zed.Zed
|
- dev.zed.Zed
|
||||||
|
|
||||||
|
- name: Install desired Flatpak applications
|
||||||
|
community.general.flatpak:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ desired_flatpaks }}"
|
||||||
|
|
||||||
|
- name: Remove undesired Flatpak applications
|
||||||
|
community.general.flatpak:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop: "{{ installed_flatpaks.stdout_lines | difference(desired_flatpaks) }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user