mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 20:04:45 +00:00
ipaservice:: 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 - `aliases` tag needs to match `argument_spec` - `default` tag needs to match `argument_spec` - `author` needs to be given with the github user also: `Name (@user)` - all parameters need to be defined argument_spec - `elements="str"` needs to be added to all list of string parameters - `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 The `copyright` date is extended with `-2022`.
This commit is contained in:
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
# Rafael Guterres Jeffman <rjeffman@redhat.com>
|
# Rafael Guterres Jeffman <rjeffman@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
|
||||||
@@ -40,21 +41,27 @@ extends_documentation_fragment:
|
|||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description: The service to manage
|
description: The service to manage
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
required: true
|
required: true
|
||||||
aliases: ["service"]
|
aliases: ["service"]
|
||||||
certificate:
|
certificate:
|
||||||
description: Base-64 encoded service certificate.
|
description: Base-64 encoded service certificate.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["usercertificate"]
|
aliases: ["usercertificate"]
|
||||||
pac_type:
|
pac_type:
|
||||||
description: Supported PAC type.
|
description: Supported PAC type.
|
||||||
required: false
|
required: false
|
||||||
choices: ["MS-PAC", "PAD", "NONE", ""]
|
choices: ["MS-PAC", "PAD", "NONE", ""]
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["pac_type", "ipakrbauthzdata"]
|
aliases: ["pac_type", "ipakrbauthzdata"]
|
||||||
auth_ind:
|
auth_ind:
|
||||||
description: Defines a whitelist for Authentication Indicators.
|
description: Defines a whitelist for Authentication Indicators.
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
required: false
|
required: false
|
||||||
choices: ["otp", "radius", "pkinit", "hardened", ""]
|
choices: ["otp", "radius", "pkinit", "hardened", ""]
|
||||||
aliases: ["krbprincipalauthind"]
|
aliases: ["krbprincipalauthind"]
|
||||||
@@ -70,24 +77,22 @@ options:
|
|||||||
description: Pre-authentication is required for the service.
|
description: Pre-authentication is required for the service.
|
||||||
required: false
|
required: false
|
||||||
type: bool
|
type: bool
|
||||||
default: False
|
|
||||||
aliases: ["ipakrbrequirespreauth"]
|
aliases: ["ipakrbrequirespreauth"]
|
||||||
ok_as_delegate:
|
ok_as_delegate:
|
||||||
description: Client credentials may be delegated to the service.
|
description: Client credentials may be delegated to the service.
|
||||||
required: false
|
required: false
|
||||||
type: bool
|
type: bool
|
||||||
default: False
|
|
||||||
aliases: ["ipakrbokasdelegate"]
|
aliases: ["ipakrbokasdelegate"]
|
||||||
ok_to_auth_as_delegate:
|
ok_to_auth_as_delegate:
|
||||||
description: Allow service to authenticate on behalf of a client.
|
description: Allow service to authenticate on behalf of a client.
|
||||||
required: false
|
required: false
|
||||||
type: bool
|
type: bool
|
||||||
default: False
|
|
||||||
aliases: ["ipakrboktoauthasdelegate"]
|
aliases: ["ipakrboktoauthasdelegate"]
|
||||||
principal:
|
principal:
|
||||||
description: List of principal aliases for the service.
|
description: List of principal aliases for the service.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["krbprincipalname"]
|
aliases: ["krbprincipalname"]
|
||||||
smb:
|
smb:
|
||||||
description: Add a SMB service.
|
description: Add a SMB service.
|
||||||
@@ -101,63 +106,75 @@ options:
|
|||||||
description: Host that can manage the service.
|
description: Host that can manage the service.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["managedby_host"]
|
aliases: ["managedby_host"]
|
||||||
allow_create_keytab_user:
|
allow_create_keytab_user:
|
||||||
description: Users allowed to create a keytab of this host.
|
description: Users allowed to create a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_write_keys_user"]
|
aliases: ["ipaallowedtoperform_write_keys_user"]
|
||||||
allow_create_keytab_group:
|
allow_create_keytab_group:
|
||||||
description: Groups allowed to create a keytab of this host.
|
description: Groups allowed to create a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_write_keys_group"]
|
aliases: ["ipaallowedtoperform_write_keys_group"]
|
||||||
allow_create_keytab_host:
|
allow_create_keytab_host:
|
||||||
description: Hosts allowed to create a keytab of this host.
|
description: Hosts allowed to create a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_write_keys_host"]
|
aliases: ["ipaallowedtoperform_write_keys_host"]
|
||||||
allow_create_keytab_hostgroup:
|
allow_create_keytab_hostgroup:
|
||||||
description: Host group allowed to create a keytab of this host.
|
description: Host group allowed to create a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_write_keys_hostgroup"]
|
aliases: ["ipaallowedtoperform_write_keys_hostgroup"]
|
||||||
allow_retrieve_keytab_user:
|
allow_retrieve_keytab_user:
|
||||||
description: User allowed to retrieve a keytab of this host.
|
description: User allowed to retrieve a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_read_keys_user"]
|
aliases: ["ipaallowedtoperform_read_keys_user"]
|
||||||
allow_retrieve_keytab_group:
|
allow_retrieve_keytab_group:
|
||||||
description: Groups allowed to retrieve a keytab of this host.
|
description: Groups allowed to retrieve a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_read_keys_group"]
|
aliases: ["ipaallowedtoperform_read_keys_group"]
|
||||||
allow_retrieve_keytab_host:
|
allow_retrieve_keytab_host:
|
||||||
description: Hosts allowed to retrieve a keytab of this host.
|
description: Hosts allowed to retrieve a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_read_keys_host"]
|
aliases: ["ipaallowedtoperform_read_keys_host"]
|
||||||
allow_retrieve_keytab_hostgroup:
|
allow_retrieve_keytab_hostgroup:
|
||||||
description: Host groups allowed to retrieve a keytab of this host.
|
description: Host groups allowed to retrieve a keytab of this host.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
aliases: ["ipaallowedtoperform_read_keys_hostgroup"]
|
aliases: ["ipaallowedtoperform_read_keys_hostgroup"]
|
||||||
continue:
|
delete_continue:
|
||||||
description:
|
description:
|
||||||
Continuous mode. Don't stop on errors. Valid only if `state` is `absent`.
|
Continuous mode. Don't stop on errors. Valid only if `state` is `absent`.
|
||||||
required: false
|
required: false
|
||||||
default: True
|
|
||||||
type: bool
|
type: bool
|
||||||
|
aliases: ["continue"]
|
||||||
action:
|
action:
|
||||||
description: Work on service or member level
|
description: Work on service or member level
|
||||||
|
type: str
|
||||||
default: service
|
default: service
|
||||||
choices: ["member", "service"]
|
choices: ["member", "service"]
|
||||||
state:
|
state:
|
||||||
description: State to ensure
|
description: State to ensure
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: ["present", "absent", "disabled"]
|
choices: ["present", "absent", "disabled"]
|
||||||
author:
|
author:
|
||||||
- Rafael Jeffman
|
- Rafael Guterres Jeffman (@rjeffman)
|
||||||
|
- Thomas Woerner (@t-woerner)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
@@ -346,18 +363,20 @@ def init_ansible_module():
|
|||||||
ansible_module = IPAAnsibleModule(
|
ansible_module = IPAAnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
# general
|
# general
|
||||||
name=dict(type="list", aliases=["service"], default=None,
|
name=dict(type="list", elements="str", aliases=["service"],
|
||||||
required=True),
|
required=True),
|
||||||
# service attributesstr
|
# service attributesstr
|
||||||
certificate=dict(type="list", aliases=['usercertificate'],
|
certificate=dict(type="list", elements="str",
|
||||||
|
aliases=['usercertificate'],
|
||||||
default=None, required=False),
|
default=None, required=False),
|
||||||
principal=dict(type="list", aliases=["krbprincipalname"],
|
principal=dict(type="list", elements="str",
|
||||||
default=None),
|
aliases=["krbprincipalname"], default=None),
|
||||||
smb=dict(type="bool", required=False),
|
smb=dict(type="bool", required=False),
|
||||||
netbiosname=dict(type="str", required=False),
|
netbiosname=dict(type="str", required=False),
|
||||||
pac_type=dict(type="list", aliases=["ipakrbauthzdata"],
|
pac_type=dict(type="list", elements="str",
|
||||||
|
aliases=["ipakrbauthzdata"],
|
||||||
choices=["MS-PAC", "PAD", "NONE", ""]),
|
choices=["MS-PAC", "PAD", "NONE", ""]),
|
||||||
auth_ind=dict(type="list",
|
auth_ind=dict(type="list", elements="str",
|
||||||
aliases=["krbprincipalauthind"],
|
aliases=["krbprincipalauthind"],
|
||||||
choices=["otp", "radius", "pkinit", "hardened", ""]),
|
choices=["otp", "radius", "pkinit", "hardened", ""]),
|
||||||
skip_host_check=dict(type="bool"),
|
skip_host_check=dict(type="bool"),
|
||||||
@@ -367,30 +386,31 @@ def init_ansible_module():
|
|||||||
ok_as_delegate=dict(type="bool", aliases=["ipakrbokasdelegate"]),
|
ok_as_delegate=dict(type="bool", aliases=["ipakrbokasdelegate"]),
|
||||||
ok_to_auth_as_delegate=dict(type="bool",
|
ok_to_auth_as_delegate=dict(type="bool",
|
||||||
aliases=["ipakrboktoauthasdelegate"]),
|
aliases=["ipakrboktoauthasdelegate"]),
|
||||||
host=dict(type="list", aliases=["managedby_host"], required=False),
|
host=dict(type="list", elements="str", aliases=["managedby_host"],
|
||||||
|
required=False),
|
||||||
allow_create_keytab_user=dict(
|
allow_create_keytab_user=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_write_keys_user']),
|
aliases=['ipaallowedtoperform_write_keys_user']),
|
||||||
allow_retrieve_keytab_user=dict(
|
allow_retrieve_keytab_user=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_read_keys_user']),
|
aliases=['ipaallowedtoperform_read_keys_user']),
|
||||||
allow_create_keytab_group=dict(
|
allow_create_keytab_group=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_write_keys_group']),
|
aliases=['ipaallowedtoperform_write_keys_group']),
|
||||||
allow_retrieve_keytab_group=dict(
|
allow_retrieve_keytab_group=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_read_keys_group']),
|
aliases=['ipaallowedtoperform_read_keys_group']),
|
||||||
allow_create_keytab_host=dict(
|
allow_create_keytab_host=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_write_keys_host']),
|
aliases=['ipaallowedtoperform_write_keys_host']),
|
||||||
allow_retrieve_keytab_host=dict(
|
allow_retrieve_keytab_host=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_read_keys_host']),
|
aliases=['ipaallowedtoperform_read_keys_host']),
|
||||||
allow_create_keytab_hostgroup=dict(
|
allow_create_keytab_hostgroup=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_write_keys_hostgroup']),
|
aliases=['ipaallowedtoperform_write_keys_hostgroup']),
|
||||||
allow_retrieve_keytab_hostgroup=dict(
|
allow_retrieve_keytab_hostgroup=dict(
|
||||||
type="list", required=False,
|
type="list", elements="str", required=False, no_log=False,
|
||||||
aliases=['ipaallowedtoperform_read_keys_hostgroup']),
|
aliases=['ipaallowedtoperform_read_keys_hostgroup']),
|
||||||
delete_continue=dict(type="bool", required=False,
|
delete_continue=dict(type="bool", required=False,
|
||||||
aliases=['continue']),
|
aliases=['continue']),
|
||||||
|
|||||||
Reference in New Issue
Block a user