c*.py: normalize docs (#9418)

* c*.py: normalize docs

* fix copy/paste mistake

* Apply suggestions from code review

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-28 02:29:05 +13:00 committed by GitHub
commit 43599c6850
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1437 additions and 1614 deletions

View file

@ -8,12 +8,11 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: cobbler_system
short_description: Manage system objects in Cobbler
description:
- Add, modify or remove systems in Cobbler
- Add, modify or remove systems in Cobbler.
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -24,67 +23,67 @@ attributes:
options:
host:
description:
- The name or IP address of the Cobbler system.
- The name or IP address of the Cobbler system.
default: 127.0.0.1
type: str
port:
description:
- Port number to be used for REST connection.
- The default value depends on parameter O(use_ssl).
- Port number to be used for REST connection.
- The default value depends on parameter O(use_ssl).
type: int
username:
description:
- The username to log in to Cobbler.
- The username to log in to Cobbler.
default: cobbler
type: str
password:
description:
- The password to log in to Cobbler.
- The password to log in to Cobbler.
type: str
use_ssl:
description:
- If V(false), an HTTP connection will be used instead of the default HTTPS connection.
- If V(false), an HTTP connection will be used instead of the default HTTPS connection.
type: bool
default: true
validate_certs:
description:
- If V(false), SSL certificates will not be validated.
- This should only set to V(false) when used on personally controlled sites using self-signed certificates.
- If V(false), SSL certificates will not be validated.
- This should only set to V(false) when used on personally controlled sites using self-signed certificates.
type: bool
default: true
name:
description:
- The system name to manage.
- The system name to manage.
type: str
properties:
description:
- A dictionary with system properties.
- A dictionary with system properties.
type: dict
interfaces:
description:
- A list of dictionaries containing interface options.
- A list of dictionaries containing interface options.
type: dict
sync:
description:
- Sync on changes.
- Concurrently syncing Cobbler is bound to fail.
- Sync on changes.
- Concurrently syncing Cobbler is bound to fail.
type: bool
default: false
state:
description:
- Whether the system should be present, absent or a query is made.
choices: [ absent, present, query ]
- Whether the system should be present, absent or a query is made.
choices: [absent, present, query]
default: present
type: str
author:
- Dag Wieers (@dagwieers)
- Dag Wieers (@dagwieers)
notes:
- Concurrently syncing Cobbler is bound to fail with weird errors.
- On python 2.7.8 and older (i.e. on RHEL7) you may need to tweak the python behaviour to disable certificate validation.
More information at L(Certificate verification in Python standard library HTTP clients,https://access.redhat.com/articles/2039753).
'''
- Concurrently syncing Cobbler is bound to fail with weird errors.
- On Python 2.7.8 and older (such as RHEL7) you may need to tweak the Python behaviour to disable certificate validation.
More information at L(Certificate verification in Python standard library HTTP clients,https://access.redhat.com/articles/2039753).
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Ensure the system exists in Cobbler
community.general.cobbler_system:
host: cobbler01
@ -93,7 +92,7 @@ EXAMPLES = r'''
name: myhost
properties:
profile: CentOS6-x86_64
name_servers: [ 2.3.4.5, 3.4.5.6 ]
name_servers: [2.3.4.5, 3.4.5.6]
name_servers_search: foo.com, bar.com
interfaces:
eth0:
@ -139,18 +138,18 @@ EXAMPLES = r'''
name: myhost
state: absent
delegate_to: localhost
'''
"""
RETURN = r'''
RETURN = r"""
systems:
description: List of systems
description: List of systems.
returned: O(state=query) and O(name) is not provided
type: list
system:
description: (Resulting) information about the system we are working with
description: (Resulting) information about the system we are working with.
returned: when O(name) is provided
type: dict
'''
"""
import ssl