mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Refactors main() function and module manager in multiple modules in line with recent changes (#53954)
Adds variable types to docs Refactors unit tests to remove deprecated parameters Adds missing Return values to documentation Removes deprecated modules unit tests
This commit is contained in:
parent
dcf40d43ea
commit
e13cb29e23
34 changed files with 478 additions and 1118 deletions
|
@ -89,19 +89,13 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import transform_name
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import transform_name
|
||||
|
||||
|
||||
|
@ -186,7 +180,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -405,16 +399,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode,
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -94,19 +94,13 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import transform_name
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import transform_name
|
||||
|
||||
|
||||
|
@ -225,7 +219,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -448,16 +442,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode,
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -213,24 +213,17 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import transform_name
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import is_cli
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import transform_name
|
||||
from ansible.module_utils.network.f5.common import compare_dictionary
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import is_cli
|
||||
|
||||
try:
|
||||
|
@ -414,7 +407,7 @@ class Parameters(AnsibleF5Parameters):
|
|||
class BaseManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = Parameters(params=self.module.params)
|
||||
self.want.update({'module': self.module})
|
||||
self.changes = Parameters(module=self.module)
|
||||
|
@ -715,18 +708,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
if not is_cli(module):
|
||||
cleanup_tokens(client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as e:
|
||||
if not is_cli(module):
|
||||
cleanup_tokens(client)
|
||||
module.fail_json(msg=str(e))
|
||||
except F5ModuleError as ex:
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -121,21 +121,15 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.icontrol import upload_file
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.icontrol import upload_file
|
||||
|
||||
|
||||
|
@ -153,7 +147,7 @@ class Parameters(AnsibleF5Parameters):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = Parameters(params=self.module.params)
|
||||
self.changes = Parameters()
|
||||
|
||||
|
@ -420,15 +414,11 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ options:
|
|||
device_group:
|
||||
description:
|
||||
- The device group that you want to perform config-sync actions on.
|
||||
type: str
|
||||
required: True
|
||||
sync_device_to_group:
|
||||
description:
|
||||
|
@ -44,8 +45,8 @@ options:
|
|||
description:
|
||||
- Indicates that the sync operation overwrites the configuration on
|
||||
the target.
|
||||
default: no
|
||||
type: bool
|
||||
default: no
|
||||
notes:
|
||||
- Requires the objectpath Python package on the host. This is as easy as
|
||||
C(pip install objectpath).
|
||||
|
@ -101,18 +102,12 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
|
||||
try:
|
||||
from objectpath import Tree
|
||||
|
@ -196,7 +191,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.changes = UsableChanges()
|
||||
|
||||
|
@ -408,9 +403,6 @@ class ArgumentSpec(object):
|
|||
self.mutually_exclusive = [
|
||||
['sync_device_to_group', 'sync_most_recent_to_device']
|
||||
]
|
||||
self.required_one_of = [
|
||||
['sync_device_to_group', 'sync_most_recent_to_device']
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -423,16 +415,12 @@ def main():
|
|||
required_one_of=spec.required_one_of
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -28,6 +28,7 @@ options:
|
|||
- Take special note that the parameters supported by this module will vary depending
|
||||
on the C(type) that you are configuring.
|
||||
- This module only supports a subset, at this time, of the total available auth types.
|
||||
type: str
|
||||
choices:
|
||||
- tacacs
|
||||
- local
|
||||
|
@ -40,6 +41,7 @@ options:
|
|||
by specifying the C(port) key.
|
||||
- If no port number is specified, the default port C(49163) is used.
|
||||
- This parameter is supported by the C(tacacs) type.
|
||||
type: raw
|
||||
suboptions:
|
||||
address:
|
||||
description:
|
||||
|
@ -57,6 +59,7 @@ options:
|
|||
server.
|
||||
- B(Do not) use the pound/hash sign in the secret for TACACS+ servers.
|
||||
- When configuring TACACS+ auth for the first time, this value is required.
|
||||
type: str
|
||||
service_name:
|
||||
description:
|
||||
- Specifies the name of the service that the user is requesting to be
|
||||
|
@ -67,6 +70,7 @@ options:
|
|||
- When configuring this form of system authentication, this setting is required.
|
||||
- Note that the majority of TACACS+ implementations are of service type C(ppp),
|
||||
so try that first.
|
||||
type: str
|
||||
choices:
|
||||
- slip
|
||||
- ppp
|
||||
|
@ -83,6 +87,7 @@ options:
|
|||
or system accounting.
|
||||
- Note that the majority of TACACS+ implementations are of protocol type C(ip),
|
||||
so try that first.
|
||||
type: str
|
||||
choices:
|
||||
- lcp
|
||||
- ip
|
||||
|
@ -110,6 +115,7 @@ options:
|
|||
request to each server until authentication succeeds, or until the system has
|
||||
sent a request to all servers in the list.
|
||||
- This parameter is supported by the C(tacacs) type.
|
||||
type: str
|
||||
choices:
|
||||
- use-first-server
|
||||
- use-all-servers
|
||||
|
@ -122,19 +128,21 @@ options:
|
|||
- The state of the authentication configuration on the system.
|
||||
- When C(present), guarantees that the system is configured for the specified C(type).
|
||||
- When C(absent), sets the system auth source back to C(local).
|
||||
default: present
|
||||
type: str
|
||||
choices:
|
||||
- absent
|
||||
- present
|
||||
default: present
|
||||
update_secret:
|
||||
description:
|
||||
- C(always) will allow to update secrets if the user chooses to do so.
|
||||
- C(on_create) will only set the secret when a C(use_auth_source) is C(yes)
|
||||
and TACACS+ is not currently the auth source.
|
||||
default: always
|
||||
type: str
|
||||
choices:
|
||||
- always
|
||||
- on_create
|
||||
default: always
|
||||
extends_documentation_fragment: f5
|
||||
author:
|
||||
- Tim Rupp (@caphrim007)
|
||||
|
@ -209,18 +217,12 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
|
||||
|
||||
class BaseParameters(AnsibleF5Parameters):
|
||||
|
@ -506,7 +508,7 @@ class BaseManager(object):
|
|||
class LocalManager(BaseManager):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = self.get_module_parameters(params=self.module.params)
|
||||
self.have = self.get_api_parameters()
|
||||
self.changes = self.get_usable_changes()
|
||||
|
@ -574,7 +576,7 @@ class LocalManager(BaseManager):
|
|||
class TacacsManager(BaseManager):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = self.get_module_parameters(params=self.module.params)
|
||||
self.have = self.get_api_parameters()
|
||||
self.changes = self.get_usable_changes()
|
||||
|
@ -719,7 +721,6 @@ class TacacsManager(BaseManager):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.kwargs = kwargs
|
||||
|
||||
def exec_module(self):
|
||||
|
@ -790,16 +791,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode,
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -25,19 +25,23 @@ options:
|
|||
- Specifies the LDAP servers that the system must use to obtain
|
||||
authentication information. You must specify a server when you
|
||||
create an LDAP configuration object.
|
||||
type: list
|
||||
port:
|
||||
description:
|
||||
- Specifies the port that the system uses for access to the remote host server.
|
||||
- When configuring LDAP device authentication for the first time, if this parameter
|
||||
is not specified, the default port is C(389).
|
||||
type: int
|
||||
remote_directory_tree:
|
||||
description:
|
||||
- Specifies the file location (tree) of the user authentication database on the
|
||||
server.
|
||||
type: str
|
||||
scope:
|
||||
description:
|
||||
- Specifies the level of the remote Active Directory or LDAP directory that the
|
||||
system should search for the user authentication.
|
||||
type: str
|
||||
choices:
|
||||
- sub
|
||||
- one
|
||||
|
@ -52,9 +56,11 @@ options:
|
|||
- Therefore, if you plan to use Active Directory or LDAP as your authentication
|
||||
source and want to use referred accounts, make sure your servers perform bind
|
||||
referral.
|
||||
type: str
|
||||
bind_password:
|
||||
description:
|
||||
- Specifies a password for the Active Directory or LDAP server user ID.
|
||||
type: str
|
||||
user_template:
|
||||
description:
|
||||
- Specifies the distinguished name of the user who is logging on.
|
||||
|
@ -68,6 +74,7 @@ options:
|
|||
- The system passes the associated password as the password for the bind operation.
|
||||
- This field can contain only one C(%s) and cannot contain any other format
|
||||
specifiers.
|
||||
type: str
|
||||
check_member_attr:
|
||||
description:
|
||||
- Checks the user's member attribute in the remote LDAP or AD group.
|
||||
|
@ -75,6 +82,7 @@ options:
|
|||
ssl:
|
||||
description:
|
||||
- Specifies whether the system uses an SSL port to communicate with the LDAP server.
|
||||
type: str
|
||||
choices:
|
||||
- "yes"
|
||||
- "no"
|
||||
|
@ -83,14 +91,17 @@ options:
|
|||
description:
|
||||
- Specifies the name of an SSL certificate from a certificate authority (CA).
|
||||
- To remove this value, use the reserved value C(none).
|
||||
type: str
|
||||
ssl_client_key:
|
||||
description:
|
||||
- Specifies the name of an SSL client key.
|
||||
- To remove this value, use the reserved value C(none).
|
||||
type: str
|
||||
ssl_client_cert:
|
||||
description:
|
||||
- Specifies the name of an SSL client certificate.
|
||||
- To remove this value, use the reserved value C(none).
|
||||
type: str
|
||||
ssl_check_peer:
|
||||
description:
|
||||
- Specifies whether the system checks an SSL peer, as a result of which the
|
||||
|
@ -102,6 +113,7 @@ options:
|
|||
associated with the selected directory entry.
|
||||
- When configuring LDAP device authentication for the first time, if this parameter
|
||||
is not specified, the default port is C(samaccountname).
|
||||
type: str
|
||||
fallback_to_local:
|
||||
description:
|
||||
- Specifies that the system uses the Local authentication method if the remote
|
||||
|
@ -111,22 +123,25 @@ options:
|
|||
description:
|
||||
- When C(present), ensures the device authentication method exists.
|
||||
- When C(absent), ensures the device authentication method does not exist.
|
||||
default: present
|
||||
type: str
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
default: present
|
||||
update_password:
|
||||
description:
|
||||
- C(always) will always update the C(bind_password).
|
||||
- C(on_create) will only set the C(bind_password) for newly created authentication
|
||||
mechanisms.
|
||||
default: always
|
||||
type: str
|
||||
choices:
|
||||
- always
|
||||
- on_create
|
||||
default: always
|
||||
extends_documentation_fragment: f5
|
||||
author:
|
||||
- Tim Rupp (@caphrim007)
|
||||
- Wojciech Wypior (@wojtek0806)
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
|
@ -141,16 +156,76 @@ EXAMPLES = r'''
|
|||
'''
|
||||
|
||||
RETURN = r'''
|
||||
param1:
|
||||
description: The new param1 value of the resource.
|
||||
servers:
|
||||
description: LDAP servers used by the system to obtain authentication information.
|
||||
returned: changed
|
||||
type: bool
|
||||
sample: true
|
||||
param2:
|
||||
description: The new param2 value of the resource.
|
||||
type: list
|
||||
sample: ['192.168.1.1', '192.168.1.2']
|
||||
port:
|
||||
description: The port that the system uses for access to the remote LDAP server.
|
||||
returned: changed
|
||||
type: int
|
||||
sample: 389
|
||||
remote_directory_tree:
|
||||
description: File location (tree) of the user authentication database on the server.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: Foo is bar
|
||||
sample: "CN=Users,DC=FOOBAR,DC=LOCAL"
|
||||
scope:
|
||||
description: The level of the remote Active Directory or LDAP directory searched for user authentication.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: base
|
||||
bind_dn:
|
||||
description: The distinguished name for the Active Directory or LDAP server user ID.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: "user@foobar.local"
|
||||
user_template:
|
||||
description: The distinguished name of the user who is logging on.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: "uid=%s,ou=people,dc=foobar,dc=local"
|
||||
check_member_attr:
|
||||
description: The user's member attribute in the remote LDAP or AD group.
|
||||
returned: changed
|
||||
type: bool
|
||||
sample: yes
|
||||
ssl:
|
||||
description: Specifies whether the system uses an SSL port to communicate with the LDAP server.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: start-tls
|
||||
ssl_ca_cert:
|
||||
description: The name of an SSL certificate from a certificate authority.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: My-Trusted-CA-Bundle.crt
|
||||
ssl_client_key:
|
||||
description: The name of an SSL client key.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: MyKey.key
|
||||
ssl_client_cert:
|
||||
description: The name of an SSL client certificate.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: MyCert.crt
|
||||
ssl_check_peer:
|
||||
description: Indicates if the system checks an SSL peer.
|
||||
returned: changed
|
||||
type: bool
|
||||
sample: yes
|
||||
login_ldap_attr:
|
||||
description: The LDAP directory attribute containing the local user name associated with the selected directory entry.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: samaccountname
|
||||
fallback_to_local:
|
||||
description: Specifies that the system uses the Local authentication method as fallback
|
||||
returned: changed
|
||||
type: bool
|
||||
sample: yes
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
@ -159,24 +234,18 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import transform_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import flatten_boolean
|
||||
from library.module_utils.network.f5.compare import cmp_str_with_none
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import transform_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import flatten_boolean
|
||||
from ansible.module_utils.network.f5.compare import cmp_str_with_none
|
||||
|
||||
|
@ -438,7 +507,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -759,16 +828,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode,
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -26,14 +26,17 @@ options:
|
|||
config_sync_ip:
|
||||
description:
|
||||
- Local IP address that the system uses for ConfigSync operations.
|
||||
type: str
|
||||
mirror_primary_address:
|
||||
description:
|
||||
- Specifies the primary IP address for the system to use to mirror
|
||||
connections.
|
||||
type: str
|
||||
mirror_secondary_address:
|
||||
description:
|
||||
- Specifies the secondary IP address for the system to use to mirror
|
||||
connections.
|
||||
type: str
|
||||
unicast_failover:
|
||||
description:
|
||||
- Desired addresses to use for failover operations. Options C(address)
|
||||
|
@ -43,6 +46,7 @@ options:
|
|||
is not specified, the default value C(1026) will be used. If you are
|
||||
specifying the (recommended) management IP address, use 'management-ip' in
|
||||
the address field.
|
||||
type: list
|
||||
failover_multicast:
|
||||
description:
|
||||
- When C(yes), ensures that the Failover Multicast configuration is enabled
|
||||
|
@ -56,23 +60,27 @@ options:
|
|||
- Interface over which the system sends multicast messages associated
|
||||
with failover. When C(failover_multicast) is C(yes) and this option is
|
||||
not provided, a default of C(eth0) will be used.
|
||||
type: str
|
||||
multicast_address:
|
||||
description:
|
||||
- IP address for the system to send multicast messages associated with
|
||||
failover. When C(failover_multicast) is C(yes) and this option is not
|
||||
provided, a default of C(224.0.0.245) will be used.
|
||||
type: str
|
||||
multicast_port:
|
||||
description:
|
||||
- Port for the system to send multicast messages associated with
|
||||
failover. When C(failover_multicast) is C(yes) and this option is not
|
||||
provided, a default of C(62960) will be used. This value must be between
|
||||
0 and 65535.
|
||||
type: int
|
||||
cluster_mirroring:
|
||||
description:
|
||||
- Specifies whether mirroring occurs within the same cluster or between
|
||||
different clusters on a multi-bladed system.
|
||||
- This parameter is only supported on platforms that have multiple blades,
|
||||
such as Viprion hardware. It is not supported on VE.
|
||||
type: str
|
||||
choices:
|
||||
- between-clusters
|
||||
- within-cluster
|
||||
|
@ -144,7 +152,7 @@ multicast_address:
|
|||
multicast_port:
|
||||
description: The new value of the C(multicast_port) setting.
|
||||
returned: changed
|
||||
type: str
|
||||
type: int
|
||||
sample: 1026
|
||||
cluster_mirroring:
|
||||
description: The current cluster-mirroring setting.
|
||||
|
@ -160,21 +168,15 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import transform_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.ipaddress import is_valid_ip
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import transform_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.ipaddress import is_valid_ip
|
||||
|
||||
|
||||
|
@ -489,7 +491,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -704,16 +706,12 @@ def main():
|
|||
required_together=spec.required_together
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -26,6 +26,7 @@ options:
|
|||
operation each time a lookup is needed. Please note that this applies
|
||||
only to Access Policy Manager features, such as ACLs, web application
|
||||
rewrites, and authentication.
|
||||
type: str
|
||||
choices:
|
||||
- enabled
|
||||
- disabled
|
||||
|
@ -34,10 +35,12 @@ options:
|
|||
name_servers:
|
||||
description:
|
||||
- A list of name servers that the system uses to validate DNS lookups
|
||||
type: list
|
||||
search:
|
||||
description:
|
||||
- A list of domains that the system searches for local domain lookups,
|
||||
to resolve local host names.
|
||||
type: list
|
||||
ip_version:
|
||||
description:
|
||||
- Specifies whether the DNS specifies IP addresses using IPv4 or IPv6.
|
||||
|
@ -48,10 +51,11 @@ options:
|
|||
description:
|
||||
- The state of the variable on the system. When C(present), guarantees
|
||||
that an existing variable is set to C(value).
|
||||
default: present
|
||||
type: str
|
||||
choices:
|
||||
- absent
|
||||
- present
|
||||
default: present
|
||||
extends_documentation_fragment: f5
|
||||
author:
|
||||
- Tim Rupp (@caphrim007)
|
||||
|
@ -108,21 +112,15 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import is_empty_list
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import is_empty_list
|
||||
|
||||
|
||||
|
@ -311,7 +309,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.pop('module', None)
|
||||
self.client = kwargs.pop('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -542,16 +540,12 @@ def main():
|
|||
required_one_of=spec.required_one_of
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -26,6 +26,7 @@ options:
|
|||
name:
|
||||
description:
|
||||
- Specifies the name of the device group.
|
||||
type: str
|
||||
required: True
|
||||
type:
|
||||
description:
|
||||
|
@ -36,12 +37,14 @@ options:
|
|||
- A C(sync-only) device group has no such failover. When creating a new
|
||||
device group, this option will default to C(sync-only).
|
||||
- This setting cannot be changed once it has been set.
|
||||
type: str
|
||||
choices:
|
||||
- sync-failover
|
||||
- sync-only
|
||||
description:
|
||||
description:
|
||||
- Description of the device group.
|
||||
type: str
|
||||
auto_sync:
|
||||
description:
|
||||
- Indicates whether configuration synchronization occurs manually or
|
||||
|
@ -78,10 +81,12 @@ options:
|
|||
- Using incremental synchronization operations can reduce the per-device sync/load
|
||||
time for configuration changes.
|
||||
- This setting is relevant only when C(full_sync) is C(no).
|
||||
type: int
|
||||
state:
|
||||
description:
|
||||
- When C(state) is C(present), ensures the device group exists.
|
||||
- When C(state) is C(absent), ensures that the device group is removed.
|
||||
type: str
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
|
@ -168,18 +173,12 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
|
||||
|
||||
class Parameters(AnsibleF5Parameters):
|
||||
|
@ -364,7 +363,7 @@ class ReportableChanges(Changes):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -593,7 +592,9 @@ class ArgumentSpec(object):
|
|||
name=dict(
|
||||
required=True
|
||||
),
|
||||
max_incremental_sync_size=dict(),
|
||||
max_incremental_sync_size=dict(
|
||||
type='int'
|
||||
),
|
||||
state=dict(
|
||||
default='present',
|
||||
choices=['absent', 'present']
|
||||
|
@ -613,16 +614,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -30,19 +30,22 @@ options:
|
|||
This member must be trusted by the device already. Trusting
|
||||
can be done with the C(bigip_device_trust) module and the
|
||||
C(peer_hostname) option to that module.
|
||||
type: str
|
||||
required: True
|
||||
device_group:
|
||||
description:
|
||||
- The device group that you want to add the member to.
|
||||
type: str
|
||||
required: True
|
||||
state:
|
||||
description:
|
||||
- When C(present), ensures that the device group member exists.
|
||||
- When C(absent), ensures the device group member is removed.
|
||||
default: present
|
||||
type: str
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
default: present
|
||||
extends_documentation_fragment: f5
|
||||
author:
|
||||
- Tim Rupp (@caphrim007)
|
||||
|
@ -83,18 +86,12 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
|
||||
|
||||
class Parameters(AnsibleF5Parameters):
|
||||
|
@ -146,7 +143,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = Parameters(params=self.module.params)
|
||||
self.have = None
|
||||
self.changes = Changes()
|
||||
|
@ -284,16 +281,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -28,12 +28,15 @@ options:
|
|||
- To specify all addresses, use the value C(all).
|
||||
- IP address can be specified, such as 172.27.1.10.
|
||||
- IP rangees can be specified, such as 172.27.*.* or 172.27.0.0/255.255.0.0.
|
||||
type: list
|
||||
auth_name:
|
||||
description:
|
||||
- Sets the BIG-IP authentication realm name.
|
||||
type: str
|
||||
auth_pam_idle_timeout:
|
||||
description:
|
||||
- Sets the GUI timeout for automatic logout, in seconds.
|
||||
type: int
|
||||
auth_pam_validate_ip:
|
||||
description:
|
||||
- Sets the authPamValidateIp setting.
|
||||
|
@ -45,6 +48,7 @@ options:
|
|||
fast_cgi_timeout:
|
||||
description:
|
||||
- Sets the timeout of FastCGI.
|
||||
type: int
|
||||
hostname_lookup:
|
||||
description:
|
||||
- Sets whether or not to display the hostname, if possible.
|
||||
|
@ -52,10 +56,20 @@ options:
|
|||
log_level:
|
||||
description:
|
||||
- Sets the minimum httpd log level.
|
||||
choices: ['alert', 'crit', 'debug', 'emerg', 'error', 'info', 'notice', 'warn']
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
- debug
|
||||
- emerg
|
||||
- error
|
||||
- info
|
||||
- notice
|
||||
- warn
|
||||
max_clients:
|
||||
description:
|
||||
- Sets the maximum number of clients that can connect to the GUI at once.
|
||||
type: int
|
||||
redirect_http_to_https:
|
||||
description:
|
||||
- Whether or not to redirect http requests to the GUI to https.
|
||||
|
@ -63,6 +77,7 @@ options:
|
|||
ssl_port:
|
||||
description:
|
||||
- The HTTPS port to listen on.
|
||||
type: int
|
||||
ssl_cipher_suite:
|
||||
description:
|
||||
- Specifies the ciphers that the system uses.
|
||||
|
@ -77,6 +92,7 @@ options:
|
|||
ECDHE-ECDSA-AES128-SHA256,ECDHE-ECDSA-AES256-SHA384,AES128-GCM-SHA256,
|
||||
AES256-GCM-SHA384,AES128-SHA,AES256-SHA,AES128-SHA256,AES256-SHA256,
|
||||
ECDHE-RSA-DES-CBC3-SHA,ECDHE-ECDSA-DES-CBC3-SHA,DES-CBC3-SHA).
|
||||
type: raw
|
||||
version_added: 2.6
|
||||
ssl_protocols:
|
||||
description:
|
||||
|
@ -87,6 +103,7 @@ options:
|
|||
recommended way to provide the cipher suite. See examples for usage.
|
||||
- Use the value C(default) to set the SSL protocols to the system default.
|
||||
This value is equivalent to specifying a list of C(all,-SSLv2,-SSLv3).
|
||||
type: raw
|
||||
version_added: 2.6
|
||||
notes:
|
||||
- Requires the requests Python package on the host. This is as easy as
|
||||
|
@ -248,18 +265,12 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
|
||||
|
||||
class Parameters(AnsibleF5Parameters):
|
||||
|
@ -525,7 +536,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -700,16 +711,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode,
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -26,12 +26,14 @@ options:
|
|||
- This parameter is required if the C(state) is equal to C(present).
|
||||
- This parameter is not required when C(state) is C(absent) and will be
|
||||
ignored if it is provided.
|
||||
type: str
|
||||
license_server:
|
||||
description:
|
||||
- The F5 license server to use when getting a license and validating a dossier.
|
||||
- This parameter is required if the C(state) is equal to C(present).
|
||||
- This parameter is not required when C(state) is C(absent) and will be
|
||||
ignored if it is provided.
|
||||
type: str
|
||||
default: activate.f5.com
|
||||
state:
|
||||
description:
|
||||
|
@ -41,11 +43,12 @@ options:
|
|||
- When C(absent), removes the license on the system.
|
||||
- When C(revoked), removes the license on the system and revokes its future usage
|
||||
on the F5 license servers.
|
||||
default: present
|
||||
type: str
|
||||
choices:
|
||||
- absent
|
||||
- present
|
||||
- revoked
|
||||
default: present
|
||||
accept_eula:
|
||||
description:
|
||||
- Declares whether you accept the BIG-IP EULA or not. By default, this
|
||||
|
@ -56,6 +59,7 @@ options:
|
|||
- This parameter is not required when C(state) is C(absent) and will be
|
||||
ignored if it is provided.
|
||||
type: bool
|
||||
default: no
|
||||
extends_documentation_fragment: f5
|
||||
author:
|
||||
- Tim Rupp (@caphrim007)
|
||||
|
@ -96,21 +100,15 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.icontrol import iControlRestSession
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.icontrol import iControlRestSession
|
||||
|
||||
|
||||
|
@ -341,7 +339,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params, client=self.client)
|
||||
self.have = ApiParameters(client=self.client)
|
||||
self.changes = UsableChanges()
|
||||
|
@ -875,19 +873,16 @@ def main():
|
|||
|
||||
module = AnsibleModule(
|
||||
argument_spec=spec.argument_spec,
|
||||
supports_check_mode=spec.supports_check_mode
|
||||
supports_check_mode=spec.supports_check_mode,
|
||||
required_if=spec.required_if
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -24,19 +24,22 @@ options:
|
|||
description:
|
||||
- A list of NTP servers to set on the device. At least one of C(ntp_servers)
|
||||
or C(timezone) is required.
|
||||
type: list
|
||||
state:
|
||||
description:
|
||||
- The state of the NTP servers on the system. When C(present), guarantees
|
||||
that the NTP servers are set on the system. When C(absent), removes the
|
||||
specified NTP servers from the device configuration.
|
||||
default: present
|
||||
type: str
|
||||
choices:
|
||||
- absent
|
||||
- present
|
||||
default: present
|
||||
timezone:
|
||||
description:
|
||||
- The timezone to set for NTP lookups. At least one of C(ntp_servers) or
|
||||
C(timezone) is required.
|
||||
type: str
|
||||
extends_documentation_fragment: f5
|
||||
author:
|
||||
- Tim Rupp (@caphrim007)
|
||||
|
@ -83,21 +86,15 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import is_empty_list
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import is_empty_list
|
||||
|
||||
|
||||
|
@ -209,7 +206,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.pop('module', None)
|
||||
self.client = kwargs.pop('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -391,16 +388,12 @@ def main():
|
|||
required_one_of=spec.required_one_of
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -33,6 +33,7 @@ options:
|
|||
banner:
|
||||
description:
|
||||
- Whether to enable the banner or not.
|
||||
type: str
|
||||
choices:
|
||||
- enabled
|
||||
- disabled
|
||||
|
@ -40,13 +41,16 @@ options:
|
|||
description:
|
||||
- Specifies the text to include on the pre-login banner that displays
|
||||
when a user attempts to login to the system using SSH.
|
||||
type: str
|
||||
inactivity_timeout:
|
||||
description:
|
||||
- Specifies the number of seconds before inactivity causes an SSH
|
||||
session to log out.
|
||||
type: int
|
||||
log_level:
|
||||
description:
|
||||
- Specifies the minimum SSHD message level to include in the system log.
|
||||
type: str
|
||||
choices:
|
||||
- debug
|
||||
- debug1
|
||||
|
@ -61,12 +65,14 @@ options:
|
|||
description:
|
||||
- Specifies, when checked C(enabled), that the system accepts SSH
|
||||
communications.
|
||||
type: str
|
||||
choices:
|
||||
- enabled
|
||||
- disabled
|
||||
port:
|
||||
description:
|
||||
- Port that you want the SSH daemon to run on.
|
||||
type: int
|
||||
notes:
|
||||
- Requires BIG-IP version 12.0.0 or greater
|
||||
extends_documentation_fragment: f5
|
||||
|
@ -157,21 +163,15 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import is_empty_list
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import is_empty_list
|
||||
|
||||
|
||||
|
@ -288,7 +288,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -428,16 +428,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -24,6 +24,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest level of messages about user authentication
|
||||
to include in the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -37,6 +38,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest level of messages about user authentication
|
||||
to include in the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -55,6 +57,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest level of messages about time-based scheduling
|
||||
to include in the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -68,6 +71,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest level of messages about time-based
|
||||
scheduling to include in the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -81,6 +85,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest level of messages about daemon performance to
|
||||
include in the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -94,6 +99,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest level of messages about daemon performance
|
||||
to include in the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -106,6 +112,7 @@ options:
|
|||
include:
|
||||
description:
|
||||
- Syslog-NG configuration to include in the device syslog config.
|
||||
type: str
|
||||
iso_date:
|
||||
description:
|
||||
- Enables or disables the ISO date format for messages in the log
|
||||
|
@ -115,6 +122,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest level of kernel messages to include in the
|
||||
system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -128,6 +136,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest level of kernel messages to include in the
|
||||
system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -141,6 +150,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest error level for messages from the local6
|
||||
facility to include in the log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -154,6 +164,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest error level for messages from the local6
|
||||
facility to include in the log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -167,6 +178,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest level of mail log messages to include in the
|
||||
system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -180,6 +192,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest level of mail log messages to include in the
|
||||
system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -193,6 +206,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest level of system messages to include in the
|
||||
system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -206,6 +220,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest level of system messages to include in the
|
||||
system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -219,6 +234,7 @@ options:
|
|||
description:
|
||||
- Specifies the lowest level of user account messages to include in
|
||||
the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -232,6 +248,7 @@ options:
|
|||
description:
|
||||
- Specifies the highest level of user account messages to include in
|
||||
the system log.
|
||||
type: str
|
||||
choices:
|
||||
- alert
|
||||
- crit
|
||||
|
@ -361,22 +378,16 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import fq_name
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.common import exit_json
|
||||
from library.module_utils.network.f5.common import fail_json
|
||||
from library.module_utils.network.f5.common import flatten_boolean
|
||||
from library.module_utils.network.f5.compare import cmp_str_with_none
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import fq_name
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.common import exit_json
|
||||
from ansible.module_utils.network.f5.common import fail_json
|
||||
from ansible.module_utils.network.f5.common import flatten_boolean
|
||||
from ansible.module_utils.network.f5.compare import cmp_str_with_none
|
||||
|
||||
|
@ -565,7 +576,7 @@ class Difference(object):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.want = ModuleParameters(params=self.module.params)
|
||||
self.have = ApiParameters()
|
||||
self.changes = UsableChanges()
|
||||
|
@ -712,16 +723,12 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode,
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
exit_json(module, results, client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
fail_json(module, ex, client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -27,6 +27,7 @@ options:
|
|||
- The peer address to connect to and trust for synchronizing configuration.
|
||||
This is typically the management address of the remote device, but may
|
||||
also be a Self IP.
|
||||
type: str
|
||||
required: True
|
||||
peer_hostname:
|
||||
description:
|
||||
|
@ -34,17 +35,20 @@ options:
|
|||
be used to easily distinguish this device in BIG-IP configuration.
|
||||
- When trusting a new device, if this parameter is not specified, the value
|
||||
of C(peer_server) will be used as a default.
|
||||
type: str
|
||||
peer_user:
|
||||
description:
|
||||
- The API username of the remote peer device that you are trusting. Note
|
||||
that the CLI user cannot be used unless it too has an API account. If this
|
||||
value is not specified, then the value of C(user), or the environment
|
||||
variable C(F5_USER) will be used.
|
||||
type: str
|
||||
peer_password:
|
||||
description:
|
||||
- The password of the API username of the remote peer device that you are
|
||||
trusting. If this value is not specified, then the value of C(password),
|
||||
or the environment variable C(F5_PASSWORD) will be used.
|
||||
type: str
|
||||
type:
|
||||
description:
|
||||
- Specifies whether the device you are adding is a Peer or a Subordinate.
|
||||
|
@ -58,6 +62,7 @@ options:
|
|||
- Designating devices as subordinate devices is recommended for device
|
||||
groups with a large number of member devices, where the risk of compromise
|
||||
is high.
|
||||
type: str
|
||||
choices:
|
||||
- peer
|
||||
- subordinate
|
||||
|
@ -66,10 +71,11 @@ options:
|
|||
description:
|
||||
- When C(present), ensures the specified devices are trusted.
|
||||
- When C(absent), removes the device trusts.
|
||||
default: present
|
||||
type: str
|
||||
choices:
|
||||
- absent
|
||||
- present
|
||||
default: present
|
||||
extends_documentation_fragment: f5
|
||||
author:
|
||||
- Tim Rupp (@caphrim007)
|
||||
|
@ -112,14 +118,12 @@ try:
|
|||
from library.module_utils.network.f5.bigip import F5RestClient
|
||||
from library.module_utils.network.f5.common import F5ModuleError
|
||||
from library.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from library.module_utils.network.f5.common import cleanup_tokens
|
||||
from library.module_utils.network.f5.common import f5_argument_spec
|
||||
from library.module_utils.network.f5.ipaddress import is_valid_ip
|
||||
except ImportError:
|
||||
from ansible.module_utils.network.f5.bigip import F5RestClient
|
||||
from ansible.module_utils.network.f5.common import F5ModuleError
|
||||
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
|
||||
from ansible.module_utils.network.f5.common import cleanup_tokens
|
||||
from ansible.module_utils.network.f5.common import f5_argument_spec
|
||||
from ansible.module_utils.network.f5.ipaddress import is_valid_ip
|
||||
|
||||
|
@ -186,7 +190,7 @@ class Parameters(AnsibleF5Parameters):
|
|||
class ModuleManager(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.module = kwargs.get('module', None)
|
||||
self.client = kwargs.get('client', None)
|
||||
self.client = F5RestClient(**self.module.params)
|
||||
self.have = None
|
||||
self.want = Parameters(params=self.module.params)
|
||||
self.changes = Parameters()
|
||||
|
@ -364,15 +368,11 @@ def main():
|
|||
supports_check_mode=spec.supports_check_mode
|
||||
)
|
||||
|
||||
client = F5RestClient(**module.params)
|
||||
|
||||
try:
|
||||
mm = ModuleManager(module=module, client=client)
|
||||
mm = ModuleManager(module=module)
|
||||
results = mm.exec_module()
|
||||
cleanup_tokens(client)
|
||||
module.exit_json(**results)
|
||||
except F5ModuleError as ex:
|
||||
cleanup_tokens(client)
|
||||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue