Skip to content

Commit

Permalink
normalize docs after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
russoz committed Dec 26, 2024
1 parent 1ddffcf commit 23eb438
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions plugins/modules/locale_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

DOCUMENTATION = """
---
DOCUMENTATION = r"""
module: locale_gen
short_description: Creates or removes locales
description:
- Manages locales in Ubuntu systems.
- Manages locales in Ubuntu systems.
author:
- Augustus Kling (@AugustusKling)
- Augustus Kling (@AugustusKling)
extends_documentation_fragment:
- community.general.attributes
- community.general.attributes
attributes:
check_mode:
support: full
Expand All @@ -28,32 +27,29 @@
type: list
elements: str
description:
- Name and encoding of the locales, such as V(en_GB.UTF-8).
- Before community.general 9.3.0, this was a string. Using a string still works.
- Name and encoding of the locales, such as V(en_GB.UTF-8).
- Before community.general 9.3.0, this was a string. Using a string still works.
required: true
state:
type: str
description:
- Whether the locales shall be present.
- Whether the locales shall be present.
choices: [absent, present]
default: present
notes:
- >
If C(/etc/locale.gen) exists, the module will assume to be using the B(glibc) mechanism,
else if C(/var/lib/locales/supported.d/) exists it will assume to be using the B(debian) mechanism,
else it will raise an error.
- When using glibc mechanism, it will manage locales by editing C(/etc/locale.gen) and running C(locale-gen).
- When using debian mechanism, it will manage locales by editing C(/var/lib/locales/supported.d/local) and then running C(locale-gen).
- >
Please note that the code path that uses debian mechanism has not been tested for a while, because Ubuntu is already using the glibc mechanism.
There is no support for that, given our inability to test it.
Therefore, that mechanism is B(deprecated) and will be removed in community.general 13.0.0.
- Currently the module is B(only supported for Ubuntu) systems.
- This module requires the package C(locales) installed in Ubuntu systems.
- If C(/etc/locale.gen) exists, the module will assume to be using the B(glibc) mechanism, else if C(/var/lib/locales/supported.d/)
exists it will assume to be using the B(debian) mechanism, else it will raise an error.
- When using glibc mechanism, it will manage locales by editing C(/etc/locale.gen) and running C(locale-gen).
- When using debian mechanism, it will manage locales by editing C(/var/lib/locales/supported.d/local) and then running
C(locale-gen).
- Please note that the code path that uses debian mechanism has not been tested for a while, because Ubuntu is already using
the glibc mechanism. There is no support for that, given our inability to test it. Therefore, that mechanism is B(deprecated)
and will be removed in community.general 13.0.0.
- Currently the module is B(only supported for Ubuntu) systems.
- This module requires the package C(locales) installed in Ubuntu systems.
"""

EXAMPLES = """
---
EXAMPLES = r"""
- name: Ensure a locale exists
community.general.locale_gen:
name: de_CH.UTF-8
Expand All @@ -62,13 +58,12 @@
- name: Ensure multiple locales exist
community.general.locale_gen:
name:
- en_GB.UTF-8
- nl_NL.UTF-8
- en_GB.UTF-8
- nl_NL.UTF-8
state: present
"""

RETURN = """
---
RETURN = r"""
mechanism:
description: Mechanism used to deploy the locales. It may have the value C(glibc) or C(debian).
type: str
Expand Down

0 comments on commit 23eb438

Please sign in to comment.