Skip to content
Snippets Groups Projects
Commit bb31fbd6 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ipaidrange: Fix documentation sections and agument spec

ansible-test with ansible-2.14 is adding a lot of new tests to ensure
that the documentation section and the agument spec is complete. Needed
changes:

DOCUMENTATION section

- `type: str` needs to be set for string parameters
- `type: list` needs to be set for list parameters
- `elements: str` needs to be given for list of string parameters
- `type: string` is not valid and needs to be replaced by `type: str`
- `required` tags need to be fixed according to the `argument_spec`
- `author` needs to be given with the github user also: `Name (@user)`

argument_spec

- `elements="str"` needs to be added to all list of string parameters

The `copyright` date is extended with `-2022`.
parent 07c8bb1e
Branches
Tags
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Authors: # Authors:
# Rafael Guterres Jeffman <rjeffman@redhat.com> # Rafael Guterres Jeffman <rjeffman@redhat.com>
# Thomas Woerner <twoerner@redhat.com>
# #
# Copyright (C) 2022 Red Hat # Copyright (C) 2022 Red Hat
# see file 'COPYING' for use and warranty information # see file 'COPYING' for use and warranty information
...@@ -40,6 +41,8 @@ extends_documentation_fragment: ...@@ -40,6 +41,8 @@ extends_documentation_fragment:
options: options:
name: name:
description: The list of idrange name strings. description: The list of idrange name strings.
type: list
elements: str
required: true required: true
aliases: ["cn"] aliases: ["cn"]
base_id: base_id:
...@@ -64,33 +67,37 @@ options: ...@@ -64,33 +67,37 @@ options:
aliases: ["ipasecondarybaserid"] aliases: ["ipasecondarybaserid"]
idrange_type: idrange_type:
description: ID range type. description: ID range type.
type: string type: str
required: false required: false
choices: ["ipa-ad-trust", "ipa-ad-trust-posix", "ipa-local"] choices: ["ipa-ad-trust", "ipa-ad-trust-posix", "ipa-local"]
aliases: ["iparangetype"] aliases: ["iparangetype"]
dom_sid: dom_sid:
description: Domain SID of the trusted domain. description: Domain SID of the trusted domain.
type: string type: str
required: false required: false
aliases: ["ipanttrusteddomainsid"] aliases: ["ipanttrusteddomainsid"]
dom_name: dom_name:
description: | description: |
Domain name of the trusted domain. Can only be used when Domain name of the trusted domain. Can only be used when
`ipaapi_context: server`. `ipaapi_context: server`.
type: string type: str
required: false required: false
aliases: ["ipanttrusteddomainname"] aliases: ["ipanttrusteddomainname"]
auto_private_groups: auto_private_groups:
description: Auto creation of private groups. description: Auto creation of private groups.
type: string type: str
required: false required: false
choices: ["true", "false", "hybrid"] choices: ["true", "false", "hybrid"]
aliases: ["ipaautoprivategroups"] aliases: ["ipaautoprivategroups"]
state: state:
description: The state to ensure. description: The state to ensure.
type: str
choices: ["present", "absent"] choices: ["present", "absent"]
default: present default: present
required: true required: false
author:
- Rafael Guterres Jeffman (@rjeffman)
- Thomas Woerner (@t-woerner)
""" """
EXAMPLES = """ EXAMPLES = """
...@@ -184,8 +191,8 @@ def main(): ...@@ -184,8 +191,8 @@ def main():
ansible_module = IPAAnsibleModule( ansible_module = IPAAnsibleModule(
argument_spec=dict( argument_spec=dict(
# general # general
name=dict(type="list", aliases=["cn"], name=dict(type="list", elements="str", aliases=["cn"],
default=None, required=True), required=True),
# present # present
base_id=dict(required=False, type='int', base_id=dict(required=False, type='int',
aliases=["ipabaseid"], default=None), aliases=["ipabaseid"], default=None),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment