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
|
||||
state: present
|
||||
|
||||
- name: Install Flatpak applications
|
||||
community.general.flatpak:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- name: Get list of installed Flatpaks
|
||||
command: flatpak list --app --columns=application
|
||||
register: installed_flatpaks
|
||||
changed_when: false
|
||||
|
||||
- name: Define desired Flatpaks
|
||||
set_fact:
|
||||
desired_flatpaks:
|
||||
- org.fkoehler.KTailctl
|
||||
- org.mozilla.Thunderbird
|
||||
- io.github.kukuruzka165.materialgram
|
||||
@ -47,3 +50,15 @@
|
||||
- io.github.nokse22.Exhibit
|
||||
- net.nokyan.Resources
|
||||
- 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