[ip ... j]*.py: normalize docs (#9392)

* [ip ... j]*.py: normalize docs

* Update plugins/modules/ip_netns.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2024-12-27 01:40:05 +13:00 committed by GitHub
parent cea6eeef37
commit a99f72fc36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 1290 additions and 1429 deletions

View file

@ -7,8 +7,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: ipa_otptoken
author: justchris1 (@justchris1)
short_description: Manage FreeIPA OTPs
@ -31,21 +30,21 @@ options:
type: str
otptype:
description:
- Type of OTP.
- "B(Note:) Cannot be modified after OTP is created."
- Type of OTP.
- B(Note:) Cannot be modified after OTP is created.
type: str
choices: [ totp, hotp ]
choices: [totp, hotp]
secretkey:
description:
- Token secret (Base64).
- If OTP is created and this is not specified, a random secret will be generated by IPA.
- "B(Note:) Cannot be modified after OTP is created."
- Token secret (Base64).
- If OTP is created and this is not specified, a random secret will be generated by IPA.
- B(Note:) Cannot be modified after OTP is created.
type: str
description:
description: Description of the token (informational only).
type: str
owner:
description: Assigned user of the token.
description: Assigned user of the token.
type: str
enabled:
description: Mark the token as enabled (default V(true)).
@ -53,15 +52,15 @@ options:
type: bool
notbefore:
description:
- First date/time the token can be used.
- In the format C(YYYYMMddHHmmss).
- For example, C(20180121182022) will allow the token to be used starting on 21 January 2018 at 18:20:22.
- First date/time the token can be used.
- In the format C(YYYYMMddHHmmss).
- For example, V(20180121182022) will allow the token to be used starting on 21 January 2018 at 18:20:22.
type: str
notafter:
description:
- Last date/time the token can be used.
- In the format C(YYYYMMddHHmmss).
- For example, C(20200121182022) will allow the token to be used until 21 January 2020 at 18:20:22.
- Last date/time the token can be used.
- In the format C(YYYYMMddHHmmss).
- For example, V(20200121182022) will allow the token to be used until 21 January 2020 at 18:20:22.
type: str
vendor:
description: Token vendor name (informational only).
@ -79,37 +78,37 @@ options:
type: str
algorithm:
description:
- Token hash algorithm.
- "B(Note:) Cannot be modified after OTP is created."
- Token hash algorithm.
- B(Note:) Cannot be modified after OTP is created.
choices: ['sha1', 'sha256', 'sha384', 'sha512']
type: str
digits:
description:
- Number of digits each token code will have.
- "B(Note:) Cannot be modified after OTP is created."
choices: [ 6, 8 ]
- Number of digits each token code will have.
- B(Note:) Cannot be modified after OTP is created.
choices: [6, 8]
type: int
offset:
description:
- TOTP token / IPA server time difference.
- "B(Note:) Cannot be modified after OTP is created."
- TOTP token / IPA server time difference.
- B(Note:) Cannot be modified after OTP is created.
type: int
interval:
description:
- Length of TOTP token code validity in seconds.
- "B(Note:) Cannot be modified after OTP is created."
- Length of TOTP token code validity in seconds.
- B(Note:) Cannot be modified after OTP is created.
type: int
counter:
description:
- Initial counter for the HOTP token.
- "B(Note:) Cannot be modified after OTP is created."
- Initial counter for the HOTP token.
- B(Note:) Cannot be modified after OTP is created.
type: int
extends_documentation_fragment:
- community.general.ipa.documentation
- community.general.attributes
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Create a totp for pinky, allowing the IPA server to generate using defaults
community.general.ipa_otptoken:
uniqueid: Token123
@ -161,14 +160,14 @@ EXAMPLES = r'''
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
'''
"""
RETURN = r'''
RETURN = r"""
otptoken:
description: OTP Token as returned by IPA API
description: OTP Token as returned by IPA API.
returned: always
type: dict
'''
"""
import base64
import traceback