community.general.xfconf – Edit XFCE4 Configurations

Note

This plugin is part of the community.general collection (version 3.8.3).

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.

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

Synopsis

  • This module allows for the manipulation of Xfce 4 Configuration with the help of xfconf-query. Please see the xfconf-query(1) man pages for more details.

Parameters

Parameter

Comments

channel

string / required

A Xfconf preference channel is a top-level tree key, inside of the Xfconf repository that corresponds to the location for which all application properties/keys are stored. See man xfconf-query(1)

disable_facts

boolean

added in 2.1.0 of community.general

For backward compatibility, output results are also returned as ansible_facts, but this behaviour is deprecated and will be removed in community.general 4.0.0.

This flag disables the output as facts and also disables the deprecation warning.

Choices:

  • no ← (default)

  • yes

force_array

aliases: array

boolean

added in 1.0.0 of community.general

Force array even if only one element

Choices:

  • no ← (default)

  • yes

property

string / required

A Xfce preference key is an element in the Xfconf repository that corresponds to an application preference. See man xfconf-query(1)

state

string

The action to take upon the property/value.

Choices:

  • get

  • present ← (default)

  • absent

value

list / elements=raw

Preference properties typically have simple values such as strings, integers, or lists of strings and integers. This is ignored if the state is “get”. For array mode, use a list of values. See man xfconf-query(1)

value_type

list / elements=string

The type of value being set. This is ignored if the state is “get”. For array mode, use a list of types.

Choices:

  • int

  • uint

  • bool

  • float

  • double

  • string

Examples

- name: Change the DPI to "192"
  xfconf:
    channel: "xsettings"
    property: "/Xft/DPI"
    value_type: "int"
    value: "192"

- name: Set workspace names (4)
  xfconf:
    channel: xfwm4
    property: /general/workspace_names
    value_type: string
    value: ['Main', 'Work1', 'Work2', 'Tmp']

- name: Set workspace names (1)
  xfconf:
    channel: xfwm4
    property: /general/workspace_names
    value_type: string
    value: ['Main']
    force_array: yes

Authors

  • Joseph Benden (@jbenden)

  • Alexei Znamensky (@russoz)

There were some errors parsing the documentation for this plugin. Please file a bug with the collection.

The errors were:

  • Unable to normalize xfconf: return due to: 3 validation errors for PluginReturnSchema
    return -> previous_value -> type
      string does not match regex "^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$)
    return -> value -> type
      string does not match regex "^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$)
    return -> value_type -> type
      string does not match regex "^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$)