community / community.general / 2.5.9 / module / flatpak Manage flatpaks Authors: John Kwiatkoski (@JayKayy), Alexander Bethke (@oolongbrothers)community.general.flatpak (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Allows users to add or remove flatpaks.
See the M(community.general.flatpak_remote) module for managing flatpak remotes.
- name: Install the spotify flatpak community.general.flatpak: name: https://s3.amazonaws.com/alexlarsson/spotify-repo/spotify.flatpakref state: present
- name: Install the gedit flatpak package community.general.flatpak: name: https://git.gnome.org/browse/gnome-apps-nightly/plain/gedit.flatpakref state: present
- name: Install the gedit package from flathub for current user community.general.flatpak: name: org.gnome.gedit state: present method: user
- name: Install the Gnome Calendar flatpak from the gnome remote system-wide community.general.flatpak: name: org.gnome.Calendar state: present remote: gnome
- name: Remove the gedit flatpak community.general.flatpak: name: org.gnome.gedit state: absent
name: description: - The name of the flatpak to manage. - When used with I(state=present), I(name) can be specified as an C(http(s)) URL to a C(flatpakref) file or the unique reverse DNS name that identifies a flatpak. - When supplying a reverse DNS name, you can use the I(remote) option to specify on what remote to look for the flatpak. An example for a reverse DNS name is C(org.gnome.gedit). - When used with I(state=absent), it is recommended to specify the name in the reverse DNS format. - When supplying an C(http(s)) URL with I(state=absent), the module will try to match the installed flatpak based on the name of the flatpakref to remove it. However, there is no guarantee that the names of the flatpakref file and the reverse DNS name of the installed flatpak do match. required: true type: str state: choices: - absent - present default: present description: - Indicates the desired package state. type: str method: choices: - system - user default: system description: - The installation method to use. - Defines if the I(flatpak) is supposed to be installed globally for the whole C(system) or only for the current C(user). type: str remote: default: flathub description: - The flatpak remote (repository) to install the flatpak from. - By default, C(flathub) is assumed, but you do need to add the flathub flatpak_remote before you can use this. - See the M(community.general.flatpak_remote) module for managing flatpak remotes. type: str executable: default: flatpak description: - The path to the C(flatpak) executable to use. - By default, this module looks for the C(flatpak) executable on the path. type: path
command: description: The exact flatpak command that was executed returned: When a flatpak command has been executed sample: /usr/bin/flatpak install --user --nontinteractive flathub org.gnome.Calculator type: str msg: description: Module error message returned: failure sample: Executable '/usr/local/bin/flatpak' was not found on the system. type: str rc: description: Return code from flatpak binary returned: When a flatpak command has been executed sample: 0 type: int stderr: description: Error output from flatpak binary returned: When a flatpak command has been executed sample: 'error: Error searching remote flathub: Can''t find ref org.gnome.KDE' type: str stdout: description: Output from flatpak binary returned: When a flatpak command has been executed sample: "org.gnome.Calendar/x86_64/stable\tcurrent\norg.gnome.gitg/x86_64/stable\t\ current\n" type: str