mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 11:24:50 +00:00
ipaautomountkey: 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 - `required` tags need to be fixed according to the `argument_spec` - `aliases` tag need to be consistent to `argument_spec` - `authors` 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 - `choices` needs to be replaced with `aliases` to match `argument_spec` argument_spec - `no_log=False` or `no_log=True` needs to be set for all parameters that have `key` in the name or for dicts also in one the key names - `required=None` needs to be replaced by `required=False` The `copyright` date is extended with `-2022`.
This commit is contained in:
@@ -3,8 +3,9 @@
|
|||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
# Chris Procter <cprocter@redhat.com>
|
# Chris Procter <cprocter@redhat.com>
|
||||||
|
# Thomas Woerner <twoerner@redhat.com>
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021 Red Hat
|
# Copyright (C) 2021-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,39 +35,43 @@ ANSIBLE_METADATA = {
|
|||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: ipaautomountkey
|
module: ipaautomountkey
|
||||||
author: chris procter
|
author:
|
||||||
|
- Chris Procter (@chr15p))
|
||||||
|
- Thomas Woerner (@t-woerner)
|
||||||
short_description: Manage FreeIPA autommount map
|
short_description: Manage FreeIPA autommount map
|
||||||
description:
|
description:
|
||||||
- Add, delete, and modify an IPA automount map
|
- Add, delete, and modify an IPA automount map
|
||||||
|
extends_documentation_fragment:
|
||||||
|
- ipamodule_base_docs
|
||||||
options:
|
options:
|
||||||
ipaadmin_principal:
|
|
||||||
description: The admin principal
|
|
||||||
default: admin
|
|
||||||
ipaadmin_password:
|
|
||||||
description: The admin password
|
|
||||||
required: False
|
|
||||||
location:
|
location:
|
||||||
description: automount location map is in
|
description: automount location map is in
|
||||||
|
type: str
|
||||||
required: True
|
required: True
|
||||||
choices: ["automountlocationcn", "automountlocation"]
|
aliases: ["automountlocationcn", "automountlocation"]
|
||||||
mapname:
|
mapname:
|
||||||
description: automount map to be managed
|
description: automount map to be managed
|
||||||
choices: ["map", "automountmapname", "automountmap"]
|
type: str
|
||||||
|
aliases: ["map", "automountmapname", "automountmap"]
|
||||||
required: True
|
required: True
|
||||||
key:
|
key:
|
||||||
description: automount key to be managed
|
description: automount key to be managed
|
||||||
|
type: str
|
||||||
required: True
|
required: True
|
||||||
choices: ["name", "automountkey"]
|
aliases: ["name", "automountkey"]
|
||||||
newkey:
|
rename:
|
||||||
description: key to change to if state is 'renamed'
|
description: key to change to if state is 'renamed'
|
||||||
required: True
|
type: str
|
||||||
choices: ["newname", "newautomountkey"]
|
required: False
|
||||||
|
aliases: ["new_name", "newautomountkey"]
|
||||||
info:
|
info:
|
||||||
description: Mount information for the key
|
description: Mount information for the key
|
||||||
required: True
|
type: str
|
||||||
choices: ["information", "automountinformation"]
|
required: False
|
||||||
|
aliases: ["information", "automountinformation"]
|
||||||
state:
|
state:
|
||||||
description: State to ensure
|
description: State to ensure
|
||||||
|
type: str
|
||||||
required: False
|
required: False
|
||||||
default: present
|
default: present
|
||||||
choices: ["present", "absent", "renamed"]
|
choices: ["present", "absent", "renamed"]
|
||||||
@@ -193,7 +198,7 @@ def main():
|
|||||||
state=dict(
|
state=dict(
|
||||||
type='str',
|
type='str',
|
||||||
choices=['present', 'absent', 'renamed'],
|
choices=['present', 'absent', 'renamed'],
|
||||||
required=None,
|
required=False,
|
||||||
default='present',
|
default='present',
|
||||||
),
|
),
|
||||||
location=dict(
|
location=dict(
|
||||||
@@ -215,6 +220,7 @@ def main():
|
|||||||
type="str",
|
type="str",
|
||||||
aliases=["name", "automountkey"],
|
aliases=["name", "automountkey"],
|
||||||
required=True,
|
required=True,
|
||||||
|
no_log=False,
|
||||||
),
|
),
|
||||||
info=dict(
|
info=dict(
|
||||||
type="str",
|
type="str",
|
||||||
|
|||||||
Reference in New Issue
Block a user