mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 20:04:45 +00:00
ipatrust 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: int` needs to be set for integer parameters - `type: bool` needs to be set for bool parameters - `required` tags need to be fixed according to the `argument_spec` - `default` tag needs to match `argument_spec` - `author` needs to be given with the github user also: `Name (@user)` - `choices` needs to match `argument_spec` argument_spec - `default=.*` needs to be dropped if `required=True` is also given The `copyright` date is extended with `-2022`.
This commit is contained in:
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
# Rob Verduijn <rob.verduijn@gmail.com>
|
# Rob Verduijn <rob.verduijn@gmail.com>
|
||||||
|
# Thomas Woerner <twoerner@redhat.com>
|
||||||
#
|
#
|
||||||
# Copyright (C) 2019 By Rob Verduijn
|
# Copyright (C) 2019-2022 By Rob Verduijn
|
||||||
# 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
|
||||||
@@ -39,62 +40,75 @@ options:
|
|||||||
realm:
|
realm:
|
||||||
description:
|
description:
|
||||||
- Realm name
|
- Realm name
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
trust_type:
|
trust_type:
|
||||||
description:
|
description:
|
||||||
- Trust type (ad for Active Directory, default)
|
- Trust type (ad for Active Directory, default)
|
||||||
|
type: str
|
||||||
default: ad
|
default: ad
|
||||||
required: false
|
required: false
|
||||||
choices: ["ad"]
|
choices: ["ad"]
|
||||||
admin:
|
admin:
|
||||||
description:
|
description:
|
||||||
- Active Directory domain administrator
|
- Active Directory domain administrator
|
||||||
|
type: str
|
||||||
required: false
|
required: false
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Active Directory domain administrator's password
|
- Active Directory domain administrator's password
|
||||||
|
type: str
|
||||||
required: false
|
required: false
|
||||||
server:
|
server:
|
||||||
description:
|
description:
|
||||||
- Domain controller for the Active Directory domain (optional)
|
- Domain controller for the Active Directory domain (optional)
|
||||||
|
type: str
|
||||||
required: false
|
required: false
|
||||||
trust_secret:
|
trust_secret:
|
||||||
description:
|
description:
|
||||||
- Shared secret for the trust
|
- Shared secret for the trust
|
||||||
|
type: str
|
||||||
required: false
|
required: false
|
||||||
base_id:
|
base_id:
|
||||||
description:
|
description:
|
||||||
- First Posix ID of the range reserved for the trusted domain
|
- First Posix ID of the range reserved for the trusted domain
|
||||||
|
type: int
|
||||||
required: false
|
required: false
|
||||||
range_size:
|
range_size:
|
||||||
description:
|
description:
|
||||||
- Size of the ID range reserved for the trusted domain
|
- Size of the ID range reserved for the trusted domain
|
||||||
|
type: int
|
||||||
|
default: 200000
|
||||||
range_type:
|
range_type:
|
||||||
description:
|
description:
|
||||||
- Type of trusted domain ID range, one of ipa-ad-trust, ipa-ad-trust-posix
|
- Type of trusted domain ID range, one of ipa-ad-trust, ipa-ad-trust-posix
|
||||||
|
type: str
|
||||||
|
choices: ["ipa-ad-trust-posix", "ipa-ad-trust"]
|
||||||
default: ipa-ad-trust
|
default: ipa-ad-trust
|
||||||
required: false
|
required: false
|
||||||
two_way:
|
two_way:
|
||||||
description:
|
description:
|
||||||
- Establish bi-directional trust. By default trust is inbound one-way only.
|
- Establish bi-directional trust. By default trust is inbound one-way only.
|
||||||
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
choices: ["true", "false"]
|
|
||||||
external:
|
external:
|
||||||
description:
|
description:
|
||||||
- Establish external trust to a domain in another forest.
|
- Establish external trust to a domain in another forest.
|
||||||
- The trust is not transitive beyond the domain.
|
- The trust is not transitive beyond the domain.
|
||||||
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
choices: ["true", "false"]
|
|
||||||
state:
|
state:
|
||||||
description: State to ensure
|
description: State to ensure
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
required: true
|
required: false
|
||||||
choices: ["present", "absent"]
|
choices: ["present", "absent"]
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- Rob Verduijn
|
- Rob Verduijn (@RobVerduijn)
|
||||||
|
- Thomas Woerner (@t-woerner)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
@@ -188,7 +202,7 @@ def main():
|
|||||||
ansible_module = IPAAnsibleModule(
|
ansible_module = IPAAnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
# general
|
# general
|
||||||
realm=dict(type="str", default=None, required=True),
|
realm=dict(type="str", required=True),
|
||||||
# state
|
# state
|
||||||
state=dict(type="str", default="present",
|
state=dict(type="str", default="present",
|
||||||
choices=["present", "absent"]),
|
choices=["present", "absent"]),
|
||||||
|
|||||||
Reference in New Issue
Block a user