Flatpak not installing via playbook

351 views
Skip to first unread message

Edward Crosby

unread,
Jan 20, 2020, 5:18:09 PM1/20/20
to Ansible Project
The following playbook doesn't seem to work:

- hosts: localhost
  tasks:
    - name: Enable flathub repo
      become: yes
      command: flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    - name: Install MakeMKV
      flatpak:
        name: com.makemkv.MakeMKV
        state: present
        method: user


The output is as follows:

fatal: [localhost]: FAILED! => {"changed": false, "command": "/usr/bin/flatpak install --user -y flathub com.makemkv.MakeMKV", "msg": "Failed to execute flatpak command", "rc": 1, "stderr": "error: No remote refs found similar to ‘flathub’\n", "stderr_lines": ["error: No remote refs found similar to ‘flathub’"], "stdout": "Looking for matches…\n", "stdout_lines": ["Looking for matches…"]}

I thought these sections from the error was interesting, and confusing:


"/usr/bin/flatpak install --user -y flathub com.makemkv.MakeMKV",

No remote refs found similar to ‘flathub

Why would it be trying to install 'flathub'?
I'm new to Ansible, still learning. Any assistance would be greatly appreciated.

Edward Crosby

unread,
Jan 21, 2020, 7:06:30 PM1/21/20
to Ansible Project
So I was told by a source that I should use flatpak_remote for adding my repo. It worked.
Here's the final playbook that works:

- hosts: localhost
  tasks:
    - name: Add flathub repo
      flatpak_remote:
        name: flathub
        state: present
        flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
        method: user

    - name: Install MakeMKV
      flatpak:
        name: com.makemkv.MakeMKV
        state: present
        method: user
Reply all
Reply to author
Forward
0 new messages