community.general.flatpak_remote (8.5.0) — module

Manage flatpak repository remotes

Authors: John Kwiatkoski (@JayKayy), Alexander Bethke (@oolongbrothers)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Allows users to add or remove flatpak remotes.

The flatpak remotes concept is comparable to what is called repositories in other packaging formats.

Currently, remote addition is only supported via C(flatpakrepo) file URLs.

Existing remotes will not be updated.

See the M(community.general.flatpak) module for managing flatpaks.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add the Gnome flatpak remote to the system installation
  community.general.flatpak_remote:
    name: gnome
    state: present
    flatpakrepo_url: https://sdk.gnome.org/gnome-apps.flatpakrepo
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add the flathub flatpak repository remote to the user installation
  community.general.flatpak_remote:
    name: flathub
    state: present
    flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
    method: user
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the Gnome flatpak remote from the user installation
  community.general.flatpak_remote:
    name: gnome
    state: absent
    method: user
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the flathub remote from the system installation
  community.general.flatpak_remote:
    name: flathub
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Disable the flathub remote in the system installation
  community.general.flatpak_remote:
    name: flathub
    state: present
    enabled: false

Inputs

    
name:
    description:
    - The desired name for the flatpak remote to be registered under on the managed host.
    - When used with O(state=present), the remote will be added to the managed host under
      the specified O(name).
    - When used with O(state=absent) the remote with that name will be removed.
    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 C(flatpak) is supposed to be installed globally for the whole V(system)
      or only for the current V(user).
    type: str

enabled:
    default: true
    description:
    - Indicates whether this remote is enabled.
    type: bool
    version_added: 6.4.0
    version_added_collection: community.general

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: str

flatpakrepo_url:
    description:
    - The URL to the C(flatpakrepo) file representing the repository remote to add.
    - When used with O(state=present), the flatpak remote specified under the O(flatpakrepo_url)
      is added using the specified installation O(method).
    - When used with O(state=absent), this is not required.
    - Required when O(state=present).
    type: str

Outputs

command:
  description: The exact flatpak command that was executed
  returned: When a flatpak command has been executed
  sample: /usr/bin/flatpak remote-add --system flatpak-test https://dl.flathub.org/repo/flathub.flatpakrepo
  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: GPG verification enabled, but no summary found (check that the configured
    URL in remote config is correct)

    '
  type: str
stdout:
  description: Output from flatpak binary
  returned: When a flatpak command has been executed
  sample: "flathub\tFlathub\thttps://dl.flathub.org/repo/\t1\t\n"
  type: str