0

I'm using Ansible to setup my linux machines (Fedora) at home. I'm using the following to add flathub repo as part of role:

- name: Enable flatpak repository.
  tags: repository,flatpak
  community.general.flatpak_remote:
    name: flathub
    flatpakrepo_url: "https://dl.flathub.org/repo/flathub.flatpakrepo"
    method: system
    state: present

and then for example:

- name: Install VLC media player.
  tags: software,vlc
  community.general.flatpak:
    name: org.videolan.VLC
    state: present

Then ansible throws an error that VLC was not found.

When I use flatpak remotes it shows:

Name Options
fedora system,oci
flathub system,filtered

I have to use manually flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo and then remotes shows just system for flathub. After that adding VLC using Ansible works like charm.

Am I doing something wrong in he playbook / role?

pepco
  • 57
  • 1
  • 5

1 Answers1

0

Notice the filtered part of your flathub remotes options. I'm guessing you did this on a version of Fedora < 38. Try issuing the following command:

flatpak remote-modify flathub --no-filter

Then vlc (and everything else) should be found as expected. Fedora Linux prior to 38 FILTERED what was available on flathub, see this for details

browseria
  • 11
  • 1
  • Sorry didn't seen your answer as it didn't send me an email (I have to have a look into the account preferences). Yes I did that on Fedora < 38, but the question was why it is adding filtered flathub repo? The "package" used by the playbook is just adding repo. Anyway, I know that from F38 there were some changes regarding flathub. Didn't have time to test playbook on new version, yet. – pepco May 29 '23 at 12:43