flatpak – Manage flatpaks
flatpak – Manage flatpaks
New in version 2.6.
Synopsis
- Allows users to add or remove flatpaks.
- See the flatpak_remote module for managing flatpak remotes.
Requirements
The below requirements are needed on the host that executes this module.
- flatpak
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
executable - |
Default: "flatpak" |
The path to the By default, this module looks for the |
method - |
|
The installation method to use. Defines if the flatpak is supposed to be installed globally for the whole |
name - / required |
The name of the flatpak to manage. When used with state=present, name can be specified as an When supplying a reverse DNS name, you can use the remote option to specify on what remote to look for the flatpak. An example for a reverse DNS name is When used with state=absent, it is recommended to specify the name in the reverse DNS format. When supplying an | |
remote - |
Default: "flathub" |
The flatpak remote (repository) to install the flatpak from. By default, See the flatpak_remote module for managing flatpak remotes. |
state - |
|
Indicates the desired package state. |
Examples
- name: Install the spotify flatpak
flatpak:
name: https://s3.amazonaws.com/alexlarsson/spotify-repo/spotify.flatpakref
state: present
- name: Install the gedit flatpak package
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
flatpak:
name: org.gnome.gedit
state: present
method: user
- name: Install the Gnome Calendar flatpak from the gnome remote system-wide
flatpak:
name: org.gnome.Calendar
state: present
remote: gnome
- name: Remove the gedit flatpak
flatpak:
name: org.gnome.gedit
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
command string |
When a flatpak command has been executed |
The exact flatpak command that was executed
Sample: /usr/bin/flatpak install --user -y flathub org.gnome.Calculator |
msg string |
failure |
Module error message
Sample: Executable '/usr/local/bin/flatpak' was not found on the system. |
rc integer |
When a flatpak command has been executed |
Return code from flatpak binary
|
stderr string |
When a flatpak command has been executed |
Error output from flatpak binary
Sample: error: Error searching remote flathub: Can't find ref org.gnome.KDE |
stdout string |
When a flatpak command has been executed |
Output from flatpak binary
Sample: org.gnome.Calendar/x86_64/stable current org.gnome.gitg/x86_64/stable current |
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- John Kwiatkoski (@JayKayy)
- Alexander Bethke (@oolongbrothers)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/flatpak_module.html