# Flatpak not installing via playbook

**URL:** <https://forum.ansible.com/t/flatpak-not-installing-via-playbook/32012>\
**Category:** Ansible Project\
**Created:** [January 20, 2020, 10:18pm UTC](https://forum.ansible.com/t/flatpak-not-installing-via-playbook/32012 "2020-01-20T22:18:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecrosby](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@ecrosby](https://forum.ansible.com/u/ecrosby)\
**Post date:** [January 20, 2020, 10:18pm UTC](https://forum.ansible.com/t/flatpak-not-installing-via-playbook/32012/1 "2020-01-20T22:18:09Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![ecrosby](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@ecrosby](https://forum.ansible.com/u/ecrosby)\
**Post date:** [January 22, 2020, 12:06am UTC](https://forum.ansible.com/t/flatpak-not-installing-via-playbook/32012/2 "2020-01-22T00:06:30Z")

</div>

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](https://dl.flathub.org/repo/flathub.flatpakrepo)_  
_method: user_  
_- name: Install MakeMKV_  
_flatpak:_  
_name: com.makemkv.MakeMKV_  
_state: present_  
_method: user_
