community.general.xfconf – Edit XFCE4 Configurations

Note

This plugin is part of the community.general collection.

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 via xfconf-query. Please see the xfconf-query(1) man pages for more details.

Parameters

Parameter Choices/Defaults 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)
force_array
boolean
added in 1.0.0 of community.general
    Choices:
  • no ←
  • yes
Force array even if only one element

aliases: array
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
    Choices:
  • get
  • present ←
  • absent
The action to take upon the property/value.
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
    Choices:
  • int
  • uint
  • bool
  • float
  • double
  • string
The type of value being set. This is ignored if the state is "get". For array mode, use a list of types.

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

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
channel
string
success
The channel specified in the module parameters

Sample:
xsettings
previous_value
string
success
The value of the preference key before executing the module (None for "get" state).

Sample:
96
property
string
success
The property specified in the module parameters

Sample:
/Xft/DPI
value
string
success
The value of the preference key after executing the module

Sample:
192
value_type
string
success
The type of the value that was changed

Sample:
int


Authors

  • Joseph Benden (@jbenden)

  • Alexei Znamensky (@russoz)