linux-config/roles/flatpaks/tasks/main.yml
Sagi Dayan 1219325293
Update
Removed all debian/ubuntu CI and tasks. Focusing on fedora.
Moved some gh_releases tasks to dnf since they are all in the fedora
repos.

Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2023-12-18 17:47:31 +02:00

39 lines
1.1 KiB
YAML

---
- name: Installing packages
become: true
package:
name:
- flatpak
state: present
- name: Add the flathub flatpak repository remote
community.general.flatpak_remote:
name: flathub
state: present
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
- name: Install multiple packages
community.general.flatpak:
name:
- org.gimp.GIMP
- org.telegram.desktop
- com.logseq.Logseq
- com.bitwarden.desktop
- com.github.tchx84.Flatseal
- com.nextcloud.desktopclient.nextcloud
- re.sonny.Junction
state: present
- name: Check if open function is set
shell: grep -c "^function open" ~/.shellconfig/functions.sh || true
register: open_test
changed_when: false
- name: "Adding 'open' shell function"
ansible.builtin.lineinfile:
name: ~/.shellconfig/functions.sh
line: |
# Open files from CLI via Junction flatpak
function open() { if [[ -f $@ || -d $@ ]]; then flatpak run re.sonny.Junction $@ &>/dev/null; else echo "❌No such file or directory '$@'"; false; fi}
state: present
when: open_test.stdout|int == 0