|
|
|
@ -23,11 +23,13 @@ options:
|
|
|
|
|
name:
|
|
|
|
|
description:
|
|
|
|
|
- Specifies the name of the log destination.
|
|
|
|
|
type: str
|
|
|
|
|
required: True
|
|
|
|
|
type:
|
|
|
|
|
description:
|
|
|
|
|
- Specifies the type of log destination.
|
|
|
|
|
- Once created, this parameter cannot be changed.
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- remote-high-speed-log
|
|
|
|
|
- remote-syslog
|
|
|
|
@ -39,6 +41,7 @@ options:
|
|
|
|
|
description:
|
|
|
|
|
description:
|
|
|
|
|
- The description of the log destination.
|
|
|
|
|
type: str
|
|
|
|
|
pool_settings:
|
|
|
|
|
description:
|
|
|
|
|
- This parameter is only available when C(type) is C(remote-high-speed-log).
|
|
|
|
@ -49,12 +52,14 @@ options:
|
|
|
|
|
- Specifies the existing pool of remote high-speed log servers where logs will be sent.
|
|
|
|
|
- When creating a new destination (and C(type) is C(remote-high-speed-log)), this parameter
|
|
|
|
|
is required.
|
|
|
|
|
type: str
|
|
|
|
|
protocol:
|
|
|
|
|
description:
|
|
|
|
|
- Specifies the protocol for the system to use to send logs to the pool of remote high-speed
|
|
|
|
|
log servers, where the logs are stored.
|
|
|
|
|
- When creating a new log destination (and C(type) is C(remote-high-speed-log)), if this
|
|
|
|
|
parameter is not specified, the default is C(tcp).
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- tcp
|
|
|
|
|
- udp
|
|
|
|
@ -70,10 +75,12 @@ options:
|
|
|
|
|
- When C(replicated), replicates each log to all pool members, for redundancy.
|
|
|
|
|
- When creating a new log destination (and C(type) is C(remote-high-speed-log)), if this
|
|
|
|
|
parameter is not specified, the default is C(adaptive).
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- adaptive
|
|
|
|
|
- balanced
|
|
|
|
|
- replicated
|
|
|
|
|
type: dict
|
|
|
|
|
syslog_settings:
|
|
|
|
|
description:
|
|
|
|
|
- This parameter is only available when C(type) is C(remote-syslog).
|
|
|
|
@ -86,6 +93,7 @@ options:
|
|
|
|
|
not specified, the default is C(bsd-syslog).
|
|
|
|
|
- The C(syslog) and C(rfc5424) choices are two ways of saying the same thing.
|
|
|
|
|
- The C(bsd-syslog) and C(rfc3164) choices are two ways of saying the same thing.
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- bsd-syslog
|
|
|
|
|
- syslog
|
|
|
|
@ -98,6 +106,8 @@ options:
|
|
|
|
|
single log server, or a remote high-speed log destination, which will be used to forward the
|
|
|
|
|
logs to a pool of remote log servers.
|
|
|
|
|
- When creating a new log destination (and C(type) is C(remote-syslog)), this parameter is required.
|
|
|
|
|
type: str
|
|
|
|
|
type: dict
|
|
|
|
|
syslog_format:
|
|
|
|
|
description:
|
|
|
|
|
- Specifies the method to use to format the logs associated with the remote Syslog log destination.
|
|
|
|
@ -105,6 +115,7 @@ options:
|
|
|
|
|
not specified, the default is C(bsd-syslog).
|
|
|
|
|
- The C(syslog) and C(rfc5424) choices are two ways of saying the same thing.
|
|
|
|
|
- The C(bsd-syslog) and C(rfc3164) choices are two ways of saying the same thing.
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- bsd-syslog
|
|
|
|
|
- syslog
|
|
|
|
@ -123,6 +134,7 @@ options:
|
|
|
|
|
ArcSight or Splunk server.
|
|
|
|
|
- When creating a new log destination and C(type) is C(remote-syslog), C(splunk), or C(arcsight),
|
|
|
|
|
this parameter is required.
|
|
|
|
|
type: str
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
pool:
|
|
|
|
|
description:
|
|
|
|
@ -133,6 +145,7 @@ options:
|
|
|
|
|
of collectors.
|
|
|
|
|
- When creating a new destination and C(type) is C(remote-high-speed-log) or C(ipfix), this
|
|
|
|
|
parameter is required.
|
|
|
|
|
type: str
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
protocol:
|
|
|
|
|
description:
|
|
|
|
@ -143,6 +156,7 @@ options:
|
|
|
|
|
- When C(type) is C(management-port), specifies the protocol used to send messages to the
|
|
|
|
|
specified location.
|
|
|
|
|
- When C(type) is C(management-port), only C(tcp) and C(udp) are valid values.
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- tcp
|
|
|
|
|
- udp
|
|
|
|
@ -161,6 +175,7 @@ options:
|
|
|
|
|
- When C(replicated), replicates each log to all pool members, for redundancy.
|
|
|
|
|
- When creating a new log destination and C(type) is C(remote-high-speed-log), if this
|
|
|
|
|
parameter is not specified, the default is C(adaptive).
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- adaptive
|
|
|
|
|
- balanced
|
|
|
|
@ -172,6 +187,7 @@ options:
|
|
|
|
|
- This parameter is only available when C(type) is C(management-port).
|
|
|
|
|
- When creating a new log destination and C(type) is C(management-port), this parameter
|
|
|
|
|
is required.
|
|
|
|
|
type: str
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
port:
|
|
|
|
|
description:
|
|
|
|
@ -180,6 +196,7 @@ options:
|
|
|
|
|
- This parameter is only available when C(type) is C(management-port).
|
|
|
|
|
- When creating a new log destination and C(type) is C(management-port), this parameter
|
|
|
|
|
is required.
|
|
|
|
|
type: int
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
transport_profile:
|
|
|
|
|
description:
|
|
|
|
@ -187,6 +204,7 @@ options:
|
|
|
|
|
- This profile defines the TCP or UDP options used to send IP-traffic logs
|
|
|
|
|
to the pool of collectors.
|
|
|
|
|
- This parameter is only available when C(type) is C(ipfix).
|
|
|
|
|
type: str
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
server_ssl_profile:
|
|
|
|
|
description:
|
|
|
|
@ -196,6 +214,7 @@ options:
|
|
|
|
|
- An SSL server profile defines how to communicate securely over SSL or
|
|
|
|
|
Transport Layer Security (TLS).
|
|
|
|
|
- This parameter is only available when C(type) is C(ipfix).
|
|
|
|
|
type: str
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
template_retransmit_interval:
|
|
|
|
|
description:
|
|
|
|
@ -205,6 +224,7 @@ options:
|
|
|
|
|
at the interval you set in this field. These retransmissions are helpful
|
|
|
|
|
for UDP, a lossy transport mechanism.
|
|
|
|
|
- This parameter is only available when C(type) is C(ipfix).
|
|
|
|
|
type: int
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
template_delete_delay:
|
|
|
|
|
description:
|
|
|
|
@ -212,19 +232,22 @@ options:
|
|
|
|
|
deleting an obsolete IPFIX template and reusing its template ID.
|
|
|
|
|
- This feature is useful for systems where you use iRules to create
|
|
|
|
|
customized IPFIX templates.
|
|
|
|
|
type: int
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
partition:
|
|
|
|
|
description:
|
|
|
|
|
- Device partition to manage resources on.
|
|
|
|
|
type: str
|
|
|
|
|
default: Common
|
|
|
|
|
state:
|
|
|
|
|
description:
|
|
|
|
|
- When C(present), ensures that the resource exists.
|
|
|
|
|
- When C(absent), ensures the resource is removed.
|
|
|
|
|
default: present
|
|
|
|
|
type: str
|
|
|
|
|
choices:
|
|
|
|
|
- present
|
|
|
|
|
- absent
|
|
|
|
|
default: present
|
|
|
|
|
extends_documentation_fragment: f5
|
|
|
|
|
author:
|
|
|
|
|
- Tim Rupp (@caphrim007)
|
|
|
|
@ -320,23 +343,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.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 transform_name
|
|
|
|
|
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.compare import cmp_str_with_none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -683,7 +700,7 @@ class Difference(object):
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
def _set_changed_options(self):
|
|
|
|
|
changed = {}
|
|
|
|
@ -1732,19 +1749,16 @@ def main():
|
|
|
|
|
|
|
|
|
|
module = AnsibleModule(
|
|
|
|
|
argument_spec=spec.argument_spec,
|
|
|
|
|
supports_check_mode=spec.supports_check_mode
|
|
|
|
|
supports_check_mode=spec.supports_check_mode,
|
|
|
|
|
mutually_exclusive=spec.mutually_exclusive
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
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__':
|
|
|
|
|