community.general.flatpak_mask module – Mask Flatpak applications

Note

This module is part of the community.general collection (version 14.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: community.general.flatpak_mask.

New in community.general 13.5.0

Synopsis

  • This module masks Flatpak applications, preventing them from being installed or updated.

  • It encapsulates the behavior of flatpak mask.

Requirements

The below requirements are needed on the host that executes this module.

  • flatpak

Parameters

Parameter

Comments

name

aliases: app

string / required

The application ID or pattern to mask (for example org.gtk.Gtk3theme.Adwaita-dark).

scope

string

Whether the mask or unmask operation applies to the system-wide installation (system) or to the user installation (user).

Choices:

  • "system" ← (default)

  • "user"

state

string

Whether the application should be masked (present) or unmasked (absent).

Choices:

  • "present" ← (default)

  • "absent"

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Returns details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Examples

- name: Mask flatpak gtk theme
  flatpak_mask:
    name: "org.gtk.Gtk3theme.Adwaita-dark"

- name: Unmask flatpak gtk theme
  flatpak_mask:
    name: "org.gtk.Gtk3theme.Adwaita-dark"
    state: absent

- name: Mask flatpak applications matching a pattern
  flatpak_mask:
    name: "org.gtk.*"

- name: Mask a flatpak application for the user installation only
  flatpak_mask:
    name: "org.gtk.Gtk3theme.Adwaita-dark"
    scope: user

Authors

  • Ilya Bogdanov (@zeerayne)