[PR #8875/4123934b backport][stable-9] reformat module docs (#8878)

reformat xfconf docs (#8875)

* reformat module docs

* fix sanity

(cherry picked from commit 4123934b46)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-09-17 15:13:23 +02:00 committed by GitHub
parent 5222df306b
commit 374378beeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 150 additions and 153 deletions

View file

@ -8,15 +8,16 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = """
---
module: xfconf module: xfconf
author: author:
- "Joseph Benden (@jbenden)" - "Joseph Benden (@jbenden)"
- "Alexei Znamensky (@russoz)" - "Alexei Znamensky (@russoz)"
short_description: Edit XFCE4 Configurations short_description: Edit XFCE4 Configurations
description: description:
- This module allows for the manipulation of Xfce 4 Configuration with the help of - This module allows for the manipulation of Xfce 4 Configuration with the help of xfconf-query. Please see the xfconf-query(1) man page for more
xfconf-query. Please see the xfconf-query(1) man page for more details. details.
seealso: seealso:
- name: xfconf-query(1) man page - name: xfconf-query(1) man page
description: Manual page of the C(xfconf-query) tool at the XFCE documentation site. description: Manual page of the C(xfconf-query) tool at the XFCE documentation site.
@ -38,34 +39,28 @@ attributes:
options: options:
channel: channel:
description: description:
- A Xfconf preference channel is a top-level tree key, inside of the - A Xfconf preference channel is a top-level tree key, inside of the Xfconf repository that corresponds to the location for which all application
Xfconf repository that corresponds to the location for which all properties/keys are stored. See man xfconf-query(1).
application properties/keys are stored. See man xfconf-query(1).
required: true required: true
type: str type: str
property: property:
description: description:
- A Xfce preference key is an element in the Xfconf repository - A Xfce preference key is an element in the Xfconf repository that corresponds to an application preference. See man xfconf-query(1).
that corresponds to an application preference. See man xfconf-query(1).
required: true required: true
type: str type: str
value: value:
description: description:
- Preference properties typically have simple values such as strings, - Preference properties typically have simple values such as strings, integers, or lists of strings and integers. See man xfconf-query(1).
integers, or lists of strings and integers. See man xfconf-query(1).
type: list type: list
elements: raw elements: raw
value_type: value_type:
description: description:
- The type of value being set. - The type of value being set.
- When providing more than one O(value_type), the length of the list must - When providing more than one O(value_type), the length of the list must be equal to the length of O(value).
be equal to the length of O(value). - If only one O(value_type) is provided, but O(value) contains more than on element, that O(value_type) will be applied to all elements of
- If only one O(value_type) is provided, but O(value) contains more than O(value).
on element, that O(value_type) will be applied to all elements of O(value). - If the O(property) being set is an array and it can possibly have only one element in the array, then O(force_array=true) must be used to
- If the O(property) being set is an array and it can possibly have only one ensure that C(xfconf-query) will interpret the value as an array rather than a scalar.
element in the array, then O(force_array=true) must be used to ensure
that C(xfconf-query) will interpret the value as an array rather than a
scalar.
- Support for V(uchar), V(char), V(uint64), and V(int64) has been added in community.general 4.8.0. - Support for V(uchar), V(char), V(uint64), and V(int64) has been added in community.general 4.8.0.
type: list type: list
elements: str elements: str
@ -84,9 +79,10 @@ options:
default: false default: false
aliases: ['array'] aliases: ['array']
version_added: 1.0.0 version_added: 1.0.0
''' """
EXAMPLES = """ EXAMPLES = """
---
- name: Change the DPI to "192" - name: Change the DPI to "192"
xfconf: xfconf:
channel: "xsettings" channel: "xsettings"
@ -110,7 +106,8 @@ EXAMPLES = """
force_array: true force_array: true
""" """
RETURN = ''' RETURN = """
---
channel: channel:
description: The channel specified in the module parameters description: The channel specified in the module parameters
returned: success returned: success
@ -123,24 +120,21 @@ RETURN = '''
sample: "/Xft/DPI" sample: "/Xft/DPI"
value_type: value_type:
description: description:
- The type of the value that was changed (V(none) for O(state=reset)). - The type of the value that was changed (V(none) for O(state=reset)). Either a single string value or a list of strings for array types.
Either a single string value or a list of strings for array types.
- This is a string or a list of strings. - This is a string or a list of strings.
returned: success returned: success
type: any type: any
sample: '"int" or ["str", "str", "str"]' sample: '"int" or ["str", "str", "str"]'
value: value:
description: description:
- The value of the preference key after executing the module. Either a - The value of the preference key after executing the module. Either a single string value or a list of strings for array types.
single string value or a list of strings for array types.
- This is a string or a list of strings. - This is a string or a list of strings.
returned: success returned: success
type: any type: any
sample: '"192" or ["orange", "yellow", "violet"]' sample: '"192" or ["orange", "yellow", "violet"]'
previous_value: previous_value:
description: description:
- The value of the preference key before executing the module. - The value of the preference key before executing the module. Either a single string value or a list of strings for array types.
Either a single string value or a list of strings for array types.
- This is a string or a list of strings. - This is a string or a list of strings.
returned: success returned: success
type: any type: any
@ -163,7 +157,7 @@ RETURN = '''
- string - string
- --set - --set
- Pacific/Auckland - Pacific/Auckland
''' """
from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper
from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner

View file

@ -7,7 +7,8 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = """
---
module: xfconf_info module: xfconf_info
author: author:
- "Alexei Znamensky (@russoz)" - "Alexei Znamensky (@russoz)"
@ -41,9 +42,10 @@ options:
type: str type: str
notes: notes:
- See man xfconf-query(1) for more details. - See man xfconf-query(1) for more details.
''' """
EXAMPLES = """ EXAMPLES = """
---
- name: Get list of all available channels - name: Get list of all available channels
community.general.xfconf_info: {} community.general.xfconf_info: {}
register: result register: result
@ -66,7 +68,8 @@ EXAMPLES = """
register: result register: result
""" """
RETURN = ''' RETURN = """
---
channels: channels:
description: description:
- List of available channels. - List of available channels.
@ -122,7 +125,7 @@ RETURN = '''
- Main - Main
- Work - Work
- Tmp - Tmp
''' """
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner