community / community.general / 8.5.0 / module / dconf Modify and read dconf database Authors: Branko Majic (@azaghal)community.general.dconf (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
This module allows modifications and reading of C(dconf) database. The module is implemented as a wrapper around C(dconf) tool. Please see the dconf(1) man page for more details.
Since C(dconf) requires a running D-Bus session to change values, the module will try to detect an existing session and reuse it, or run the tool via C(dbus-run-session).
- name: Configure available keyboard layouts in Gnome community.general.dconf: key: "/org/gnome/desktop/input-sources/sources" value: "[('xkb', 'us'), ('xkb', 'se')]" state: present
- name: Read currently available keyboard layouts in Gnome community.general.dconf: key: "/org/gnome/desktop/input-sources/sources" state: read register: keyboard_layouts
- name: Reset the available keyboard layouts in Gnome community.general.dconf: key: "/org/gnome/desktop/input-sources/sources" state: absent
- name: Configure available keyboard layouts in Cinnamon community.general.dconf: key: "/org/gnome/libgnomekbd/keyboard/layouts" value: "['us', 'se']" state: present
- name: Read currently available keyboard layouts in Cinnamon community.general.dconf: key: "/org/gnome/libgnomekbd/keyboard/layouts" state: read register: keyboard_layouts
- name: Reset the available keyboard layouts in Cinnamon community.general.dconf: key: "/org/gnome/libgnomekbd/keyboard/layouts" state: absent
- name: Disable desktop effects in Cinnamon community.general.dconf: key: "/org/cinnamon/desktop-effects" value: "false" state: present
key: description: - A dconf key to modify or read from the dconf database. required: true type: str state: choices: - read - present - absent default: present description: - The action to take upon the key/value. required: false type: str value: description: - Value to set for the specified dconf key. Value should be specified in GVariant format. Due to complexity of this format, it is best to have a look at existing values in the dconf database. - Required for O(state=present). - Although the type is specified as "raw", it should typically be specified as a string. However, boolean values in particular are handled properly even when specified as booleans rather than strings (in fact, handling booleans properly is why the type of this parameter is "raw"). required: false type: raw
value: description: value associated with the requested key returned: success, state was "read" sample: '''Default''' type: str