mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 19:34:45 +00:00
ipapwpolicy: 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 - `author` needs to be given with the github user also: `Name (@user)` - `extends_documentation_fragment: ipamodule_base_docs` needs added and `ipaadmin_*` parameters need to be removed argument_spec - `elements="str"` needs to be added to all list of string parameters The `copyright` date is extended with `-2022`.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# Authors:
|
# Authors:
|
||||||
# Thomas Woerner <twoerner@redhat.com>
|
# Thomas Woerner <twoerner@redhat.com>
|
||||||
#
|
#
|
||||||
# Copyright (C) 2019 Red Hat
|
# Copyright (C) 2019-2022 Red Hat
|
||||||
# see file 'COPYING' for use and warranty information
|
# see file 'COPYING' for use and warranty information
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@@ -34,15 +34,13 @@ DOCUMENTATION = """
|
|||||||
module: ipapwpolicy
|
module: ipapwpolicy
|
||||||
short_description: Manage FreeIPA pwpolicies
|
short_description: Manage FreeIPA pwpolicies
|
||||||
description: Manage FreeIPA pwpolicies
|
description: Manage FreeIPA pwpolicies
|
||||||
|
extends_documentation_fragment:
|
||||||
|
- ipamodule_base_docs
|
||||||
options:
|
options:
|
||||||
ipaadmin_principal:
|
|
||||||
description: The admin principal
|
|
||||||
default: admin
|
|
||||||
ipaadmin_password:
|
|
||||||
description: The admin password
|
|
||||||
required: false
|
|
||||||
name:
|
name:
|
||||||
description: The group name
|
description: The group name
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
required: false
|
required: false
|
||||||
aliases: ["cn"]
|
aliases: ["cn"]
|
||||||
maxlife:
|
maxlife:
|
||||||
@@ -92,10 +90,11 @@ options:
|
|||||||
aliases: ["krbpwdlockoutduration"]
|
aliases: ["krbpwdlockoutduration"]
|
||||||
state:
|
state:
|
||||||
description: State to ensure
|
description: State to ensure
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: ["present", "absent"]
|
choices: ["present", "absent"]
|
||||||
author:
|
author:
|
||||||
- Thomas Woerner
|
- Thomas Woerner (@t-woerner)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
@@ -164,8 +163,8 @@ def main():
|
|||||||
ansible_module = IPAAnsibleModule(
|
ansible_module = IPAAnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
# general
|
# general
|
||||||
name=dict(type="list", aliases=["cn"], default=None,
|
name=dict(type="list", elements="str", aliases=["cn"],
|
||||||
required=False),
|
default=None, required=False),
|
||||||
# present
|
# present
|
||||||
|
|
||||||
maxlife=dict(type="int", aliases=["krbmaxpwdlife"], default=None),
|
maxlife=dict(type="int", aliases=["krbmaxpwdlife"], default=None),
|
||||||
|
|||||||
Reference in New Issue
Block a user