ansible.builtin.flatpak_remote (v2.9.27) — module

Manage flatpak repository remotes

| "added in version" 2.6 of ansible.builtin"

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

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

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 I(flatpakrepo) file URLs.

Existing remotes will not be updated.

See the M(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
  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
  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
  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
  flatpak_remote:
    name: flathub
    state: absent

Inputs

    
name:
    description:
    - The desired name for the flatpak remote to be registered under on the managed host.
    - When used with I(state=present), the remote will be added to the managed host under
      the specified I(name).
    - When used with I(state=absent) the remote with that name will be removed.
    required: true

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Indicates the desired package state.

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).

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.

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

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