Skip to content

Commit dece9d9

Browse files
authored
Update API docs and fix linting issues (#268)
* Fix document linting errors * Add documentation for cm_prepare_db module * Add futures for Python and encoding Signed-off-by: Webster Mudge <[email protected]>
1 parent f2f568c commit dece9d9

File tree

5 files changed

+81
-4
lines changed

5 files changed

+81
-4
lines changed

plugins/filter/version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RETURN:
5757
- A dictionary of the version parts.
5858
- If unable to parse the string, returns C(None).
5959
type: dict
60-
options:
60+
contains:
6161
major:
6262
description: Major version
6363
minor:

plugins/modules/cm_prepare_db.py

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,79 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
from __future__ import annotations
18+
from __future__ import absolute_import, division, print_function
19+
20+
__metaclass__ = type
21+
22+
DOCUMENTATION = r"""
23+
module: cm_prepare_db
24+
short_description: Configure the external Cloudera Manager server database
25+
description:
26+
- Configure the external Cloudera Manager server database.
27+
author:
28+
- "Webster Mudge (@wmudge)"
29+
version_added: "3.0.0"
30+
options:
31+
config:
32+
description:
33+
- The database properties configuration file.
34+
type: path
35+
required: false
36+
default: "/etc/cloudera-scm-server/db.properties"
37+
script:
38+
description:
39+
- The script to execute.
40+
type: path
41+
required: true
42+
type:
43+
description:
44+
- The database type to install.
45+
type: str
46+
required: true
47+
choices:
48+
- postgresql
49+
- oracle
50+
- mysql
51+
host:
52+
description:
53+
- The database server host.
54+
type: str
55+
required: true
56+
port:
57+
description:
58+
- The database server port.
59+
type: int
60+
required: true
61+
database:
62+
description:
63+
- The name of the database.
64+
type: str
65+
required: true
66+
username:
67+
description:
68+
- The username to access the database server.
69+
type: str
70+
required: true
71+
password:
72+
description:
73+
- The password to access the database server.
74+
type: str
75+
required: true
76+
"""
77+
78+
EXAMPLES = r"""
79+
- name: Prepare Cloudera Manager server external database
80+
cloudera.exe.cm_prepare_db:
81+
script: /opt/scm_prepare_database.sh
82+
type: postreqsql
83+
host: db.example.internal
84+
port: 7717
85+
database: cms
86+
username: cms_db_user
87+
password: SuperSecretPassword
88+
"""
89+
90+
RETURN = r""""""
1991

2092
import configparser
2193

plugins/modules/deprecation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18+
from __future__ import absolute_import, division, print_function
19+
20+
__metaclass__ = type
21+
1822
DOCUMENTATION = r"""
1923
module: deprecation
2024
short_description: Display a deprecation warning

plugins/modules/jdk_facts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/python
2+
# -*- coding: utf-8 -*-
23

34
# Copyright 2024 Cloudera, Inc.
45
#
@@ -23,7 +24,7 @@
2324
short_description: Retrieve JDK information
2425
description:
2526
- Retrieve information about the installed Java JDK as facts.
26-
version_added: 3.0.0
27+
version_added: "3.0.0"
2728
author:
2829
- Webster Mudge <[email protected]>
2930
extends_documentation_fragment:

roles/prereq_database/meta/argument_specs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ argument_specs:
6464
type: str
6565
required: true
6666
owner:
67-
description: The name of the database user owning the database. Defaults to O(database_accounts.user).
67+
description: The name of the database user owning the database. Defaults to O(database_accounts[].user).
6868
type: str
6969
required: false

0 commit comments

Comments
 (0)