utm*: normalize docs (#9335)

* utm*: normalize docs

* Update plugins/modules/utm_aaa_group.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/9322/head
Alexei Znamensky 2024-12-24 09:30:11 +13:00 committed by GitHub
parent d5237ee486
commit c141f86883
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 1487 additions and 1525 deletions

View File

@ -8,120 +8,117 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_aaa_group module: utm_aaa_group
author: author:
- Johannes Brunswicker (@MatrixCrawler) - Johannes Brunswicker (@MatrixCrawler)
short_description: Create, update or destroy an aaa group object in Sophos UTM short_description: Create, update or destroy an aaa group object in Sophos UTM
description: description:
- Create, update or destroy an aaa group object in Sophos UTM. - Create, update or destroy an aaa group object in Sophos UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
description: description:
- The name of the object. Will be used to identify the entry. - The name of the object. Will be used to identify the entry.
type: str type: str
required: true required: true
adirectory_groups: adirectory_groups:
description: description:
- List of adirectory group strings. - List of adirectory group strings.
type: list type: list
elements: str elements: str
default: [] default: []
adirectory_groups_sids: adirectory_groups_sids:
description: description:
- Dictionary of group sids. - Dictionary of group sids.
type: dict type: dict
default: {} default: {}
backend_match: backend_match:
description: description:
- The backend for the group. - The backend for the group.
type: str type: str
choices: choices:
- none - none
- adirectory - adirectory
- edirectory - edirectory
- radius - radius
- tacacs - tacacs
- ldap - ldap
default: none default: none
comment: comment:
description: description:
- Comment that describes the AAA group. - Comment that describes the AAA group.
type: str type: str
default: '' default: ''
dynamic: dynamic:
description: description:
- Group type. Is static if none is selected. - Group type. Is static if none is selected.
type: str type: str
default: none default: none
choices: choices:
- none - none
- ipsec_dn - ipsec_dn
- directory_groups - directory_groups
edirectory_groups: edirectory_groups:
description: description:
- List of edirectory group strings. - List of edirectory group strings.
type: list type: list
elements: str elements: str
default: [] default: []
ipsec_dn: ipsec_dn:
description: description:
- The ipsec dn string. - The ipsec dn string.
type: str type: str
default: '' default: ''
ldap_attribute: ldap_attribute:
description: description:
- The ldap attribute to check against. - The ldap attribute to check against.
type: str type: str
default: '' default: ''
ldap_attribute_value: ldap_attribute_value:
description: description:
- The ldap attribute value to check against. - The ldap attribute value to check against.
type: str type: str
default: '' default: ''
members: members:
description: description:
- A list of user ref names (aaa/user). - A list of user ref names (aaa/user).
type: list type: list
elements: str elements: str
default: [] default: []
network: network:
description: description:
- The network reference name. The objects contains the known ip addresses for the authentication object (network/aaa). - The network reference name. The objects contains the known IP addresses for the authentication object (network/aaa).
type: str type: str
default: "" default: ""
radius_groups: radius_groups:
description: description:
- A list of radius group strings. - A list of radius group strings.
type: list type: list
elements: str elements: str
default: [] default: []
tacacs_groups: tacacs_groups:
description: description:
- A list of tacacs group strings. - A list of tacacs group strings.
type: list type: list
elements: str elements: str
default: [] default: []
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create UTM aaa_group - name: Create UTM aaa_group
community.general.utm_aaa_group: community.general.utm_aaa_group:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -142,63 +139,63 @@ EXAMPLES = """
state: absent state: absent
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created. description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object. description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked. description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object. description: The type of the object.
type: str type: str
name: name:
description: The name of the object. description: The name of the object.
type: str type: str
adirectory_groups: adirectory_groups:
description: List of Active Directory Groups. description: List of Active Directory Groups.
type: str type: str
adirectory_groups_sids: adirectory_groups_sids:
description: List of Active Directory Groups SIDS. description: List of Active Directory Groups SIDS.
type: list type: list
backend_match: backend_match:
description: The backend to use. description: The backend to use.
type: str type: str
comment: comment:
description: The comment string. description: The comment string.
type: str type: str
dynamic: dynamic:
description: Whether the group match is ipsec_dn or directory_group. description: Whether the group match is ipsec_dn or directory_group.
type: str type: str
edirectory_groups: edirectory_groups:
description: List of eDirectory Groups. description: List of eDirectory Groups.
type: str type: str
ipsec_dn: ipsec_dn:
description: ipsec_dn identifier to match. description: Ipsec_dn identifier to match.
type: str type: str
ldap_attribute: ldap_attribute:
description: The LDAP Attribute to match against. description: The LDAP Attribute to match against.
type: str type: str
ldap_attribute_value: ldap_attribute_value:
description: The LDAP Attribute Value to match against. description: The LDAP Attribute Value to match against.
type: str type: str
members: members:
description: List of member identifiers of the group. description: List of member identifiers of the group.
type: list type: list
network: network:
description: The identifier of the network (network/aaa). description: The identifier of the network (network/aaa).
type: str type: str
radius_group: radius_group:
description: The radius group identifier. description: The radius group identifier.
type: str type: str
tacacs_group: tacacs_group:
description: The tacacs group identifier. description: The tacacs group identifier.
type: str type: str
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -10,38 +10,35 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_aaa_group_info module: utm_aaa_group_info
author: author:
- Johannes Brunswicker (@MatrixCrawler) - Johannes Brunswicker (@MatrixCrawler)
short_description: Get info for reverse_proxy frontend entry in Sophos UTM short_description: Get info for reverse_proxy frontend entry in Sophos UTM
description: description:
- get info for a reverse_proxy frontend entry in SOPHOS UTM. - Get info for a reverse_proxy frontend entry in SOPHOS UTM.
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Remove UTM aaa_group - name: Remove UTM aaa_group
community.general.utm_aaa_group_info: community.general.utm_aaa_group_info:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -49,63 +46,63 @@ EXAMPLES = """
name: TestAAAGroupEntry name: TestAAAGroupEntry
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
adirectory_groups: adirectory_groups:
description: List of Active Directory Groups description: List of Active Directory Groups.
type: str type: str
adirectory_groups_sids: adirectory_groups_sids:
description: List of Active Directory Groups SIDS description: List of Active Directory Groups SIDS.
type: list type: list
backend_match: backend_match:
description: The backend to use description: The backend to use.
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
dynamic: dynamic:
description: Whether the group match is ipsec_dn or directory_group description: Whether the group match is ipsec_dn or directory_group.
type: str type: str
edirectory_groups: edirectory_groups:
description: List of eDirectory Groups description: List of eDirectory Groups.
type: str type: str
ipsec_dn: ipsec_dn:
description: ipsec_dn identifier to match description: Ipsec_dn identifier to match.
type: str type: str
ldap_attribute: ldap_attribute:
description: The LDAP Attribute to match against description: The LDAP Attribute to match against.
type: str type: str
ldap_attribute_value: ldap_attribute_value:
description: The LDAP Attribute Value to match against description: The LDAP Attribute Value to match against.
type: str type: str
members: members:
description: List of member identifiers of the group description: List of member identifiers of the group.
type: list type: list
network: network:
description: The identifier of the network (network/aaa) description: The identifier of the network (network/aaa).
type: str type: str
radius_group: radius_group:
description: The radius group identifier description: The radius group identifier.
type: str type: str
tacacs_group: tacacs_group:
description: The tacacs group identifier description: The tacacs group identifier.
type: str type: str
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,67 +9,64 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_ca_host_key_cert module: utm_ca_host_key_cert
author: author:
- Stephan Schwarz (@stearz) - Stephan Schwarz (@stearz)
short_description: Create, update or destroy ca host_key_cert entry in Sophos UTM short_description: Create, update or destroy ca host_key_cert entry in Sophos UTM
description: description:
- Create, update or destroy a ca host_key_cert entry in SOPHOS UTM. - Create, update or destroy a ca host_key_cert entry in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
description: description:
- The name of the object. Will be used to identify the entry. - The name of the object. Will be used to identify the entry.
required: true required: true
type: str type: str
ca: ca:
description: description:
- A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object. - A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object.
required: true required: true
type: str type: str
meta: meta:
description: description:
- A reference to an existing utm_ca_meta_x509 object. - A reference to an existing utm_ca_meta_x509 object.
required: true required: true
type: str type: str
certificate: certificate:
description: description:
- The certificate in PEM format. - The certificate in PEM format.
required: true required: true
type: str type: str
comment: comment:
description: description:
- Optional comment string. - Optional comment string.
type: str type: str
encrypted: encrypted:
description: description:
- Optionally enable encryption. - Optionally enable encryption.
default: false default: false
type: bool type: bool
key: key:
description: description:
- Optional private key in PEM format. - Optional private key in PEM format.
type: str type: str
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create a ca_host_key_cert entry - name: Create a ca_host_key_cert entry
community.general.utm_ca_host_key_cert: community.general.utm_ca_host_key_cert:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -98,45 +95,44 @@ EXAMPLES = """
utm_token: abcdefghijklmno1234 utm_token: abcdefghijklmno1234
name: TestHostKeyCertEntry name: TestHostKeyCertEntry
state: info state: info
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
ca: ca:
description: A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object. description: A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object.
type: str type: str
meta: meta:
description: A reference to an existing utm_ca_meta_x509 object. description: A reference to an existing utm_ca_meta_x509 object.
type: str type: str
certificate: certificate:
description: The certificate in PEM format description: The certificate in PEM format.
type: str type: str
comment: comment:
description: Comment string (may be empty string) description: Comment string (may be empty string).
type: str type: str
encrypted: encrypted:
description: If encryption is enabled description: If encryption is enabled.
type: bool type: bool
key: key:
description: Private key in PEM format (may be empty string) description: Private key in PEM format (may be empty string).
type: str type: str
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,37 +9,35 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_ca_host_key_cert_info module: utm_ca_host_key_cert_info
author: author:
- Stephan Schwarz (@stearz) - Stephan Schwarz (@stearz)
short_description: Get info for a ca host_key_cert entry in Sophos UTM short_description: Get info for a ca host_key_cert entry in Sophos UTM
description: description:
- Get info for a ca host_key_cert entry in SOPHOS UTM. - Get info for a ca host_key_cert entry in SOPHOS UTM.
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Get info for a ca host_key_cert entry - name: Get info for a ca host_key_cert entry
community.general.utm_ca_host_key_cert_info: community.general.utm_ca_host_key_cert_info:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -47,42 +45,42 @@ EXAMPLES = """
name: TestHostKeyCertEntry name: TestHostKeyCertEntry
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
ca: ca:
description: A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object. description: A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object.
type: str type: str
meta: meta:
description: A reference to an existing utm_ca_meta_x509 object. description: A reference to an existing utm_ca_meta_x509 object.
type: str type: str
certificate: certificate:
description: The certificate in PEM format description: The certificate in PEM format.
type: str type: str
comment: comment:
description: Comment string (may be empty string) description: Comment string (may be empty string).
type: str type: str
encrypted: encrypted:
description: If encryption is enabled description: If encryption is enabled.
type: bool type: bool
key: key:
description: Private key in PEM format (may be empty string) description: Private key in PEM format (may be empty string).
type: str type: str
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -8,78 +8,75 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_dns_host module: utm_dns_host
author: author:
- Johannes Brunswicker (@MatrixCrawler) - Johannes Brunswicker (@MatrixCrawler)
short_description: Create, update or destroy dns entry in Sophos UTM short_description: Create, update or destroy dns entry in Sophos UTM
description: description:
- Create, update or destroy a dns entry in SOPHOS UTM. - Create, update or destroy a dns entry in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
address: address:
type: str type: str
description: description:
- The IPV4 Address of the entry. Can be left empty for automatic resolving. - The IPV4 Address of the entry. Can be left empty for automatic resolving.
default: 0.0.0.0 default: 0.0.0.0
address6: address6:
type: str type: str
description: description:
- The IPV6 Address of the entry. Can be left empty for automatic resolving. - The IPV6 Address of the entry. Can be left empty for automatic resolving.
default: "::" default: "::"
comment: comment:
type: str type: str
description: description:
- An optional comment to add to the dns host object - An optional comment to add to the dns host object.
default: '' default: ''
hostname: hostname:
type: str type: str
description: description:
- The hostname for the dns host object - The hostname for the dns host object.
interface: interface:
type: str type: str
description: description:
- The reference name of the interface to use. If not provided the default interface will be used - The reference name of the interface to use. If not provided the default interface will be used.
default: '' default: ''
resolved: resolved:
description: description:
- whether the hostname's ipv4 address is already resolved or not - Whether the hostname's ipv4 address is already resolved or not.
default: false default: false
type: bool type: bool
resolved6: resolved6:
description: description:
- whether the hostname's ipv6 address is already resolved or not - Whether the hostname's ipv6 address is already resolved or not.
default: false default: false
type: bool type: bool
timeout: timeout:
type: int type: int
description: description:
- the timeout for the utm to resolve the ip address for the hostname again - The timeout for the utm to resolve the ip address for the hostname again.
default: 0 default: 0
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create UTM dns host entry - name: Create UTM dns host entry
community.general.utm_dns_host: community.general.utm_dns_host:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -96,45 +93,45 @@ EXAMPLES = """
state: absent state: absent
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
name: name:
description: The name of the object description: The name of the object.
type: str type: str
address: address:
description: The ipv4 address of the object description: The ipv4 address of the object.
type: str type: str
address6: address6:
description: The ipv6 address of the object description: The ipv6 address of the object.
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
hostname: hostname:
description: The hostname of the object description: The hostname of the object.
type: str type: str
interface: interface:
description: The reference name of the interface the object is associated with description: The reference name of the interface the object is associated with.
type: str type: str
resolved: resolved:
description: Whether the ipv4 address is resolved or not description: Whether the ipv4 address is resolved or not.
type: bool type: bool
resolved6: resolved6:
description: Whether the ipv6 address is resolved or not description: Whether the ipv6 address is resolved or not.
type: bool type: bool
timeout: timeout:
description: The timeout until a new resolving will be attempted description: The timeout until a new resolving will be attempted.
type: int type: int
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -8,62 +8,58 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_network_interface_address module: utm_network_interface_address
author: author:
- Juergen Wiebe (@steamx) - Juergen Wiebe (@steamx)
short_description: Create, update or destroy network/interface_address object short_description: Create, update or destroy network/interface_address object
description: description:
- Create, update or destroy a network/interface_address object in SOPHOS UTM. - Create, update or destroy a network/interface_address object in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
address: address:
type: str type: str
description: description:
- The ip4 address of the network/interface_address object. - The ip4 address of the network/interface_address object.
required: true required: true
address6: address6:
type: str type: str
description: description:
- The ip6 address of the network/interface_address object. - The ip6 address of the network/interface_address object.
required: false required: false
comment: comment:
type: str type: str
description: description:
- An optional comment to add to the object - An optional comment to add to the object.
default: '' default: ''
resolved: resolved:
type: bool type: bool
description: description:
- Whether or not the object is resolved - Whether or not the object is resolved.
resolved6: resolved6:
type: bool type: bool
description: description:
- Whether or not the object is resolved - Whether or not the object is resolved.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create a network interface address - name: Create a network interface address
utm_proxy_backend: utm_proxy_backend:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -81,39 +77,39 @@ EXAMPLES = """
state: absent state: absent
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
address: address:
description: The ip4 address of the network/interface_address object description: The ip4 address of the network/interface_address object.
type: str type: str
address6: address6:
description: The ip6 address of the network/interface_address object description: The ip6 address of the network/interface_address object.
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
resolved: resolved:
description: Whether or not the object is resolved description: Whether or not the object is resolved.
type: bool type: bool
resolved6: resolved6:
description: Whether or not the object is resolved description: Whether or not the object is resolved.
type: bool type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -8,37 +8,35 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_network_interface_address_info module: utm_network_interface_address_info
author: author:
- Juergen Wiebe (@steamx) - Juergen Wiebe (@steamx)
short_description: Get info for a network/interface_address object short_description: Get info for a network/interface_address object
description: description:
- Get info for a network/interface_address object in SOPHOS UTM. - Get info for a network/interface_address object in SOPHOS UTM.
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Get network interface address info - name: Get network interface address info
utm_proxy_interface_address_info: utm_proxy_interface_address_info:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -46,39 +44,39 @@ EXAMPLES = """
name: TestNetworkInterfaceAddress name: TestNetworkInterfaceAddress
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
address: address:
description: The ip4 address of the network/interface_address object description: The ip4 address of the network/interface_address object.
type: str type: str
address6: address6:
description: The ip6 address of the network/interface_address object description: The ip6 address of the network/interface_address object.
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
resolved: resolved:
description: Whether or not the object is resolved description: Whether or not the object is resolved.
type: bool type: bool
resolved6: resolved6:
description: Whether or not the object is resolved description: Whether or not the object is resolved.
type: bool type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,183 +9,180 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_proxy_auth_profile module: utm_proxy_auth_profile
author: author:
- Stephan Schwarz (@stearz) - Stephan Schwarz (@stearz)
short_description: Create, update or destroy reverse_proxy auth_profile entry in Sophos UTM short_description: Create, update or destroy reverse_proxy auth_profile entry in Sophos UTM
description: description:
- Create, update or destroy a reverse_proxy auth_profile entry in SOPHOS UTM. - Create, update or destroy a reverse_proxy auth_profile entry in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
aaa: aaa:
type: list type: list
elements: str elements: str
description: description:
- List of references to utm_aaa objects (allowed users or groups) - List of references to utm_aaa objects (allowed users or groups).
required: true required: true
basic_prompt: basic_prompt:
type: str type: str
description: description:
- The message in the basic authentication prompt - The message in the basic authentication prompt.
required: true required: true
backend_mode: backend_mode:
type: str type: str
description: description:
- Specifies if the backend server needs authentication ([Basic|None]) - Specifies if the backend server needs authentication ([Basic|None]).
default: None default: None
choices: choices:
- Basic - Basic
- None - None
backend_strip_basic_auth: backend_strip_basic_auth:
description: description:
- Should the login data be stripped when proxying the request to the backend host - Should the login data be stripped when proxying the request to the backend host.
type: bool type: bool
default: true default: true
backend_user_prefix: backend_user_prefix:
type: str type: str
description: description:
- Prefix string to prepend to the username for backend authentication - Prefix string to prepend to the username for backend authentication.
default: "" default: ""
backend_user_suffix: backend_user_suffix:
type: str type: str
description: description:
- Suffix string to append to the username for backend authentication - Suffix string to append to the username for backend authentication.
default: "" default: ""
comment: comment:
type: str type: str
description: description:
- Optional comment string - Optional comment string.
default: "" default: ""
frontend_cookie: frontend_cookie:
type: str type: str
description: description:
- Frontend cookie name - Frontend cookie name.
frontend_cookie_secret: frontend_cookie_secret:
type: str type: str
description: description:
- Frontend cookie secret - Frontend cookie secret.
frontend_form: frontend_form:
type: str type: str
description: description:
- Frontend authentication form name - Frontend authentication form name.
frontend_form_template: frontend_form_template:
type: str type: str
description: description:
- Frontend authentication form template - Frontend authentication form template.
default: "" default: ""
frontend_login: frontend_login:
type: str type: str
description: description:
- Frontend login name - Frontend login name.
frontend_logout: frontend_logout:
type: str type: str
description: description:
- Frontend logout name - Frontend logout name.
frontend_mode: frontend_mode:
type: str type: str
description: description:
- Frontend authentication mode (Form|Basic) - Frontend authentication mode (Form|Basic).
default: Basic default: Basic
choices: choices:
- Basic - Basic
- Form - Form
frontend_realm: frontend_realm:
type: str type: str
description: description:
- Frontend authentication realm - Frontend authentication realm.
frontend_session_allow_persistency: frontend_session_allow_persistency:
description: description:
- Allow session persistency - Allow session persistency.
type: bool type: bool
default: false default: false
frontend_session_lifetime: frontend_session_lifetime:
type: int type: int
description: description:
- session lifetime - Session lifetime.
required: true required: true
frontend_session_lifetime_limited: frontend_session_lifetime_limited:
description: description:
- Specifies if limitation of session lifetime is active - Specifies if limitation of session lifetime is active.
type: bool type: bool
default: true default: true
frontend_session_lifetime_scope: frontend_session_lifetime_scope:
type: str type: str
description: description:
- scope for frontend_session_lifetime (days|hours|minutes) - Scope for frontend_session_lifetime (days|hours|minutes).
default: hours default: hours
choices: choices:
- days - days
- hours - hours
- minutes - minutes
frontend_session_timeout: frontend_session_timeout:
type: int type: int
description: description:
- session timeout - Session timeout.
required: true required: true
frontend_session_timeout_enabled: frontend_session_timeout_enabled:
description: description:
- Specifies if session timeout is active - Specifies if session timeout is active.
type: bool type: bool
default: true default: true
frontend_session_timeout_scope: frontend_session_timeout_scope:
type: str type: str
description: description:
- scope for frontend_session_timeout (days|hours|minutes) - Scope for frontend_session_timeout (days|hours|minutes).
default: minutes default: minutes
choices: choices:
- days - days
- hours - hours
- minutes - minutes
logout_delegation_urls: logout_delegation_urls:
type: list type: list
elements: str elements: str
description: description:
- List of logout URLs that logouts are delegated to - List of logout URLs that logouts are delegated to.
default: [] default: []
logout_mode: logout_mode:
type: str type: str
description: description:
- Mode of logout (None|Delegation) - Mode of logout (None|Delegation).
default: None default: None
choices: choices:
- None - None
- Delegation - Delegation
redirect_to_requested_url: redirect_to_requested_url:
description: description:
- Should a redirect to the requested URL be made - Should a redirect to the requested URL be made.
type: bool type: bool
default: false default: false
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create UTM proxy_auth_profile - name: Create UTM proxy_auth_profile
community.general.utm_proxy_auth_profile: community.general.utm_proxy_auth_profile:
utm_host: sophos.host.name utm_host: sophos.host.name
utm_token: abcdefghijklmno1234 utm_token: abcdefghijklmno1234
name: TestAuthProfileEntry name: TestAuthProfileEntry
aaa: [REF_OBJECT_STRING,REF_ANOTHEROBJECT_STRING] aaa: [REF_OBJECT_STRING, REF_ANOTHEROBJECT_STRING]
basic_prompt: "Authentication required: Please login" basic_prompt: "Authentication required: Please login"
frontend_session_lifetime: 1 frontend_session_lifetime: 1
frontend_session_timeout: 1 frontend_session_timeout: 1
@ -204,99 +201,98 @@ EXAMPLES = """
utm_token: abcdefghijklmno1234 utm_token: abcdefghijklmno1234
name: TestAuthProfileEntry name: TestAuthProfileEntry
state: info state: info
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
aaa: aaa:
description: List of references to utm_aaa objects (allowed users or groups) description: List of references to utm_aaa objects (allowed users or groups).
type: list type: list
basic_prompt: basic_prompt:
description: The message in the basic authentication prompt description: The message in the basic authentication prompt.
type: str type: str
backend_mode: backend_mode:
description: Specifies if the backend server needs authentication ([Basic|None]) description: Specifies if the backend server needs authentication ([Basic|None]).
type: str type: str
backend_strip_basic_auth: backend_strip_basic_auth:
description: Should the login data be stripped when proxying the request to the backend host description: Should the login data be stripped when proxying the request to the backend host.
type: bool type: bool
backend_user_prefix: backend_user_prefix:
description: Prefix string to prepend to the username for backend authentication description: Prefix string to prepend to the username for backend authentication.
type: str type: str
backend_user_suffix: backend_user_suffix:
description: Suffix string to append to the username for backend authentication description: Suffix string to append to the username for backend authentication.
type: str type: str
comment: comment:
description: Optional comment string description: Optional comment string.
type: str type: str
frontend_cookie: frontend_cookie:
description: Frontend cookie name description: Frontend cookie name.
type: str type: str
frontend_form: frontend_form:
description: Frontend authentication form name description: Frontend authentication form name.
type: str type: str
frontend_form_template: frontend_form_template:
description: Frontend authentication form template description: Frontend authentication form template.
type: str type: str
frontend_login: frontend_login:
description: Frontend login name description: Frontend login name.
type: str type: str
frontend_logout: frontend_logout:
description: Frontend logout name description: Frontend logout name.
type: str type: str
frontend_mode: frontend_mode:
description: Frontend authentication mode (Form|Basic) description: Frontend authentication mode (Form|Basic).
type: str type: str
frontend_realm: frontend_realm:
description: Frontend authentication realm description: Frontend authentication realm.
type: str type: str
frontend_session_allow_persistency: frontend_session_allow_persistency:
description: Allow session persistency description: Allow session persistency.
type: bool type: bool
frontend_session_lifetime: frontend_session_lifetime:
description: session lifetime description: Session lifetime.
type: int type: int
frontend_session_lifetime_limited: frontend_session_lifetime_limited:
description: Specifies if limitation of session lifetime is active description: Specifies if limitation of session lifetime is active.
type: bool type: bool
frontend_session_lifetime_scope: frontend_session_lifetime_scope:
description: scope for frontend_session_lifetime (days|hours|minutes) description: Scope for frontend_session_lifetime (days|hours|minutes).
type: str type: str
frontend_session_timeout: frontend_session_timeout:
description: session timeout description: Session timeout.
type: int type: int
frontend_session_timeout_enabled: frontend_session_timeout_enabled:
description: Specifies if session timeout is active description: Specifies if session timeout is active.
type: bool type: bool
frontend_session_timeout_scope: frontend_session_timeout_scope:
description: scope for frontend_session_timeout (days|hours|minutes) description: Scope for frontend_session_timeout (days|hours|minutes).
type: str type: str
logout_delegation_urls: logout_delegation_urls:
description: List of logout URLs that logouts are delegated to description: List of logout URLs that logouts are delegated to.
type: list type: list
logout_mode: logout_mode:
description: Mode of logout (None|Delegation) description: Mode of logout (None|Delegation).
type: str type: str
redirect_to_requested_url: redirect_to_requested_url:
description: Should a redirect to the requested URL be made description: Should a redirect to the requested URL be made.
type: bool type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,130 +9,127 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_proxy_exception module: utm_proxy_exception
author: author:
- Sebastian Schenzel (@RickS-C137) - Sebastian Schenzel (@RickS-C137)
short_description: Create, update or destroy reverse_proxy exception entry in Sophos UTM short_description: Create, update or destroy reverse_proxy exception entry in Sophos UTM
description: description:
- Create, update or destroy a reverse_proxy exception entry in SOPHOS UTM. - Create, update or destroy a reverse_proxy exception entry in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
type: str type: str
op: op:
description: description:
- The operand to be used with the entries of the path parameter - The operand to be used with the entries of the path parameter.
default: 'AND' default: 'AND'
choices: choices:
- 'AND' - 'AND'
- 'OR' - 'OR'
required: false required: false
type: str type: str
path: path:
description: description:
- The paths the exception in the reverse proxy is defined for - The paths the exception in the reverse proxy is defined for.
type: list type: list
elements: str elements: str
default: [] default: []
required: false required: false
skip_custom_threats_filters: skip_custom_threats_filters:
description: description:
- A list of threats to be skipped - A list of threats to be skipped.
type: list type: list
elements: str elements: str
default: [] default: []
required: false required: false
skip_threats_filter_categories: skip_threats_filter_categories:
description: description:
- Define which categories of threats are skipped - Define which categories of threats are skipped.
type: list type: list
elements: str elements: str
default: [] default: []
required: false required: false
skipav: skipav:
description: description:
- Skip the Antivirus Scanning - Skip the Antivirus Scanning.
default: false default: false
type: bool type: bool
required: false required: false
skipbadclients: skipbadclients:
description: description:
- Block clients with bad reputation - Block clients with bad reputation.
default: false default: false
type: bool type: bool
required: false required: false
skipcookie: skipcookie:
description: description:
- Skip the Cookie Signing check - Skip the Cookie Signing check.
default: false default: false
type: bool type: bool
required: false required: false
skipform: skipform:
description: description:
- Enable form hardening - Enable form hardening.
default: false default: false
type: bool type: bool
required: false required: false
skipform_missingtoken: skipform_missingtoken:
description: description:
- Enable form hardening with missing tokens - Enable form hardening with missing tokens.
default: false default: false
type: bool type: bool
required: false required: false
skiphtmlrewrite: skiphtmlrewrite:
description: description:
- Protection against SQL - Protection against SQL.
default: false default: false
type: bool type: bool
required: false required: false
skiptft: skiptft:
description: description:
- Enable true file type control - Enable true file type control.
default: false default: false
type: bool type: bool
required: false required: false
skipurl: skipurl:
description: description:
- Enable static URL hardening - Enable static URL hardening.
default: false default: false
type: bool type: bool
required: false required: false
source: source:
description: description:
- Define which categories of threats are skipped - Define which categories of threats are skipped.
type: list type: list
elements: str elements: str
default: [] default: []
required: false required: false
status: status:
description: description:
- Status of the exception rule set - Status of the exception rule set.
default: true default: true
type: bool type: bool
required: false required: false
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create UTM proxy_exception - name: Create UTM proxy_exception
community.general.utm_proxy_exception: community.general.utm_proxy_exception:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -149,66 +146,66 @@ EXAMPLES = """
state: absent state: absent
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
comment: comment:
description: The optional comment string description: The optional comment string.
type: str type: str
op: op:
description: The operand to be used with the entries of the path parameter description: The operand to be used with the entries of the path parameter.
type: str type: str
path: path:
description: The paths the exception in the reverse proxy is defined for description: The paths the exception in the reverse proxy is defined for.
type: list type: list
skip_custom_threats_filters: skip_custom_threats_filters:
description: A list of threats to be skipped description: A list of threats to be skipped.
type: list type: list
skip_threats_filter_categories: skip_threats_filter_categories:
description: Define which categories of threats are skipped description: Define which categories of threats are skipped.
type: list type: list
skipav: skipav:
description: Skip the Antivirus Scanning description: Skip the Antivirus Scanning.
type: bool type: bool
skipbadclients: skipbadclients:
description: Block clients with bad reputation description: Block clients with bad reputation.
type: bool type: bool
skipcookie: skipcookie:
description: Skip the Cookie Signing check description: Skip the Cookie Signing check.
type: bool type: bool
skipform: skipform:
description: Enable form hardening description: Enable form hardening.
type: bool type: bool
skipform_missingtoken: skipform_missingtoken:
description: Enable form hardening with missing tokens description: Enable form hardening with missing tokens.
type: bool type: bool
skiphtmlrewrite: skiphtmlrewrite:
description: Protection against SQL description: Protection against SQL.
type: bool type: bool
skiptft: skiptft:
description: Enable true file type control description: Enable true file type control.
type: bool type: bool
skipurl: skipurl:
description: Enable static URL hardening description: Enable static URL hardening.
type: bool type: bool
source: source:
description: Define which categories of threats are skipped description: Define which categories of threats are skipped.
type: list type: list
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,145 +9,142 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_proxy_frontend module: utm_proxy_frontend
author: author:
- Johannes Brunswicker (@MatrixCrawler) - Johannes Brunswicker (@MatrixCrawler)
short_description: Create, update or destroy reverse_proxy frontend entry in Sophos UTM short_description: Create, update or destroy reverse_proxy frontend entry in Sophos UTM
description: description:
- Create, update or destroy a reverse_proxy frontend entry in Sophos UTM. - Create, update or destroy a reverse_proxy frontend entry in Sophos UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
add_content_type_header : add_content_type_header:
description: description:
- Whether to add the content type header or not - Whether to add the content type header or not.
type: bool type: bool
default: false default: false
address: address:
type: str type: str
description: description:
- The reference name of the network/interface_address object. - The reference name of the network/interface_address object.
default: REF_DefaultInternalAddress default: REF_DefaultInternalAddress
allowed_networks: allowed_networks:
type: list type: list
elements: str elements: str
description: description:
- A list of reference names for the allowed networks. - A list of reference names for the allowed networks.
default: ['REF_NetworkAny'] default: ['REF_NetworkAny']
certificate: certificate:
type: str type: str
description: description:
- The reference name of the ca/host_key_cert object. - The reference name of the ca/host_key_cert object.
default: "" default: ""
comment: comment:
type: str type: str
description: description:
- An optional comment to add to the object - An optional comment to add to the object.
default: "" default: ""
disable_compression: disable_compression:
description: description:
- Whether to enable the compression - Whether to enable the compression.
type: bool type: bool
default: false default: false
domain: domain:
type: list type: list
elements: str elements: str
description: description:
- A list of domain names for the frontend object - A list of domain names for the frontend object.
exceptions: exceptions:
type: list type: list
elements: str elements: str
description: description:
- A list of exception ref names (reverse_proxy/exception) - A list of exception ref names (reverse_proxy/exception).
default: [] default: []
htmlrewrite: htmlrewrite:
description: description:
- Whether to enable html rewrite or not - Whether to enable html rewrite or not.
type: bool type: bool
default: false default: false
htmlrewrite_cookies: htmlrewrite_cookies:
description: description:
- Whether to enable html rewrite cookie or not - Whether to enable html rewrite cookie or not.
type: bool type: bool
default: false default: false
implicitredirect: implicitredirect:
description: description:
- Whether to enable implicit redirection or not - Whether to enable implicit redirection or not.
type: bool type: bool
default: false default: false
lbmethod: lbmethod:
type: str type: str
description: description:
- Which loadbalancer method should be used - Which loadbalancer method should be used.
choices: choices:
- "" - ""
- bybusyness - bybusyness
- bytraffic - bytraffic
- byrequests - byrequests
default: bybusyness default: bybusyness
locations: locations:
type: list type: list
elements: str elements: str
description: description:
- A list of location ref names (reverse_proxy/location) - A list of location ref names (reverse_proxy/location).
default: [] default: []
port: port:
type: int type: int
description: description:
- The frontend http port - The frontend http port.
default: 80 default: 80
preservehost: preservehost:
description: description:
- Whether to preserve host header - Whether to preserve host header.
type: bool type: bool
default: false default: false
profile: profile:
type: str type: str
description: description:
- The reference string of the reverse_proxy/profile - The reference string of the reverse_proxy/profile.
default: "" default: ""
status: status:
description: description:
- Whether to activate the frontend entry or not - Whether to activate the frontend entry or not.
type: bool type: bool
default: true default: true
type: type:
type: str type: str
description: description:
- Which protocol should be used - Which protocol should be used.
choices: choices:
- http - http
- https - https
default: http default: http
xheaders: xheaders:
description: description:
- Whether to pass the host header or not - Whether to pass the host header or not.
type: bool type: bool
default: false default: false
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create utm proxy_frontend - name: Create utm proxy_frontend
community.general.utm_proxy_frontend: community.general.utm_proxy_frontend:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -164,81 +161,81 @@ EXAMPLES = """
state: absent state: absent
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
add_content_type_header: add_content_type_header:
description: Whether to add the content type header description: Whether to add the content type header.
type: bool type: bool
address: address:
description: The reference name of the address description: The reference name of the address.
type: str type: str
allowed_networks: allowed_networks:
description: List of reference names of networks associated description: List of reference names of networks associated.
type: list type: list
certificate: certificate:
description: Reference name of certificate (ca/host_key_cert) description: Reference name of certificate (ca/host_key_cert).
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
disable_compression: disable_compression:
description: State of compression support description: State of compression support.
type: bool type: bool
domain: domain:
description: List of hostnames description: List of hostnames.
type: list type: list
exceptions: exceptions:
description: List of associated proxy exceptions description: List of associated proxy exceptions.
type: list type: list
htmlrewrite: htmlrewrite:
description: State of html rewrite description: State of html rewrite.
type: bool type: bool
htmlrewrite_cookies: htmlrewrite_cookies:
description: Whether the html rewrite cookie will be set description: Whether the html rewrite cookie will be set.
type: bool type: bool
implicitredirect: implicitredirect:
description: Whether to use implicit redirection description: Whether to use implicit redirection.
type: bool type: bool
lbmethod: lbmethod:
description: The method of loadbalancer to use description: The method of loadbalancer to use.
type: str type: str
locations: locations:
description: The reference names of reverse_proxy/locations associated with the object description: The reference names of reverse_proxy/locations associated with the object.
type: list type: list
port: port:
description: The port of the frontend connection description: The port of the frontend connection.
type: int type: int
preservehost: preservehost:
description: Preserve host header description: Preserve host header.
type: bool type: bool
profile: profile:
description: The associated reverse_proxy/profile description: The associated reverse_proxy/profile.
type: str type: str
status: status:
description: Whether the frontend object is active or not description: Whether the frontend object is active or not.
type: bool type: bool
type: type:
description: The connection type description: The connection type.
type: str type: str
xheaders: xheaders:
description: The xheaders state description: The xheaders state.
type: bool type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,38 +9,36 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_proxy_frontend_info module: utm_proxy_frontend_info
author: author:
- Johannes Brunswicker (@MatrixCrawler) - Johannes Brunswicker (@MatrixCrawler)
short_description: Create, update or destroy reverse_proxy frontend entry in Sophos UTM short_description: Create, update or destroy reverse_proxy frontend entry in Sophos UTM
description: description:
- Create, update or destroy a reverse_proxy frontend entry in SOPHOS UTM. - Create, update or destroy a reverse_proxy frontend entry in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Get utm proxy_frontend - name: Get utm proxy_frontend
community.general.utm_proxy_frontend_info: community.general.utm_proxy_frontend_info:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -49,81 +47,81 @@ EXAMPLES = """
host: REF_OBJECT_STRING host: REF_OBJECT_STRING
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
add_content_type_header: add_content_type_header:
description: Whether to add the content type header description: Whether to add the content type header.
type: bool type: bool
address: address:
description: The reference name of the address description: The reference name of the address.
type: str type: str
allowed_networks: allowed_networks:
description: List of reference names of networks associated description: List of reference names of networks associated.
type: list type: list
certificate: certificate:
description: Reference name of certificate (ca/host_key_cert) description: Reference name of certificate (ca/host_key_cert).
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
disable_compression: disable_compression:
description: State of compression support description: State of compression support.
type: bool type: bool
domain: domain:
description: List of hostnames description: List of hostnames.
type: list type: list
exceptions: exceptions:
description: List of associated proxy exceptions description: List of associated proxy exceptions.
type: list type: list
htmlrewrite: htmlrewrite:
description: State of html rewrite description: State of html rewrite.
type: bool type: bool
htmlrewrite_cookies: htmlrewrite_cookies:
description: whether the html rewrite cookie will be set description: Whether the html rewrite cookie will be set.
type: bool type: bool
implicitredirect: implicitredirect:
description: whether to use implicit redirection description: Whether to use implicit redirection.
type: bool type: bool
lbmethod: lbmethod:
description: The method of loadbalancer to use description: The method of loadbalancer to use.
type: str type: str
locations: locations:
description: The reference names of reverse_proxy/locations associated with the object description: The reference names of reverse_proxy/locations associated with the object.
type: list type: list
port: port:
description: The port of the frontend connection description: The port of the frontend connection.
type: int type: int
preservehost: preservehost:
description: Preserve host header description: Preserve host header.
type: bool type: bool
profile: profile:
description: The associated reverse_proxy/profile description: The associated reverse_proxy/profile.
type: str type: str
status: status:
description: Whether the frontend object is active or not description: Whether the frontend object is active or not.
type: bool type: bool
type: type:
description: The connection type description: The connection type.
type: str type: str
xheaders: xheaders:
description: The xheaders state description: The xheaders state.
type: bool type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,111 +9,108 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_proxy_location module: utm_proxy_location
author: author:
- Johannes Brunswicker (@MatrixCrawler) - Johannes Brunswicker (@MatrixCrawler)
short_description: Create, update or destroy reverse_proxy location entry in Sophos UTM short_description: Create, update or destroy reverse_proxy location entry in Sophos UTM
description: description:
- Create, update or destroy a reverse_proxy location entry in SOPHOS UTM. - Create, update or destroy a reverse_proxy location entry in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
support: none support: none
diff_mode: diff_mode:
support: none support: none
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
access_control: access_control:
description: description:
- whether to activate the access control for the location - Whether to activate the access control for the location.
type: str type: str
default: '0' default: '0'
choices: choices:
- '0' - '0'
- '1' - '1'
allowed_networks: allowed_networks:
description: description:
- A list of allowed networks - A list of allowed networks.
type: list type: list
elements: str elements: str
default: default:
- REF_NetworkAny - REF_NetworkAny
auth_profile: auth_profile:
type: str type: str
description: description:
- The reference name of the auth profile - The reference name of the auth profile.
default: '' default: ''
backend: backend:
type: list type: list
elements: str elements: str
description: description:
- A list of backends that are connected with this location declaration - A list of backends that are connected with this location declaration.
default: [] default: []
be_path: be_path:
type: str type: str
description: description:
- The path of the backend - The path of the backend.
default: '' default: ''
comment: comment:
type: str type: str
description: description:
- The optional comment string - The optional comment string.
default: '' default: ''
denied_networks: denied_networks:
type: list type: list
elements: str elements: str
description: description:
- A list of denied network references - A list of denied network references.
default: [] default: []
hot_standby: hot_standby:
description: description:
- Activate hot standby mode - Activate hot standby mode.
type: bool type: bool
default: false default: false
path: path:
type: str type: str
description: description:
- The path of the location - The path of the location.
default: "/" default: "/"
status: status:
description: description:
- Whether the location is active or not - Whether the location is active or not.
type: bool type: bool
default: true default: true
stickysession_id: stickysession_id:
type: str type: str
description: description:
- The stickysession id - The stickysession id.
default: ROUTEID default: ROUTEID
stickysession_status: stickysession_status:
description: description:
- Enable the stickysession - Enable the stickysession.
type: bool type: bool
default: false default: false
websocket_passthrough: websocket_passthrough:
description: description:
- Enable the websocket passthrough - Enable the websocket passthrough.
type: bool type: bool
default: false default: false
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
"""
''' EXAMPLES = r"""
EXAMPLES = """
- name: Create UTM proxy_location - name: Create UTM proxy_location
utm_proxy_backend: utm_proxy_backend:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -130,63 +127,63 @@ EXAMPLES = """
state: absent state: absent
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
access_control: access_control:
description: Whether to use access control state description: Whether to use access control state.
type: str type: str
allowed_networks: allowed_networks:
description: List of allowed network reference names description: List of allowed network reference names.
type: list type: list
auth_profile: auth_profile:
description: The auth profile reference name description: The auth profile reference name.
type: str type: str
backend: backend:
description: The backend reference name description: The backend reference name.
type: str type: str
be_path: be_path:
description: The backend path description: The backend path.
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
denied_networks: denied_networks:
description: The list of the denied network names description: The list of the denied network names.
type: list type: list
hot_standby: hot_standby:
description: Use hot standby description: Use hot standby.
type: bool type: bool
path: path:
description: Path name description: Path name.
type: str type: str
status: status:
description: Whether the object is active or not description: Whether the object is active or not.
type: bool type: bool
stickysession_id: stickysession_id:
description: The identifier of the stickysession description: The identifier of the stickysession.
type: str type: str
stickysession_status: stickysession_status:
description: Whether to use stickysession or not description: Whether to use stickysession or not.
type: bool type: bool
websocket_passthrough: websocket_passthrough:
description: Whether websocket passthrough will be used or not description: Whether websocket passthrough will be used or not.
type: bool type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule

View File

@ -9,38 +9,36 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: utm_proxy_location_info module: utm_proxy_location_info
author: author:
- Johannes Brunswicker (@MatrixCrawler) - Johannes Brunswicker (@MatrixCrawler)
short_description: Create, update or destroy reverse_proxy location entry in Sophos UTM short_description: Create, update or destroy reverse_proxy location entry in Sophos UTM
description: description:
- Create, update or destroy a reverse_proxy location entry in SOPHOS UTM. - Create, update or destroy a reverse_proxy location entry in SOPHOS UTM.
- This module needs to have the REST Ability of the UTM to be activated. - This module needs to have the REST Ability of the UTM to be activated.
attributes: attributes:
check_mode: check_mode:
version_added: 3.3.0 version_added: 3.3.0
# This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix # This was backported to 2.5.4 and 1.3.11 as well, since this was a bugfix
options: options:
name: name:
type: str type: str
description: description:
- The name of the object. Will be used to identify the entry - The name of the object. Will be used to identify the entry.
required: true required: true
extends_documentation_fragment: extends_documentation_fragment:
- community.general.utm - community.general.utm
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
''' """
EXAMPLES = """ EXAMPLES = r"""
- name: Remove UTM proxy_location - name: Remove UTM proxy_location
community.general.utm_proxy_location_info: community.general.utm_proxy_location_info:
utm_host: sophos.host.name utm_host: sophos.host.name
@ -48,63 +46,63 @@ EXAMPLES = """
name: TestLocationEntry name: TestLocationEntry
""" """
RETURN = """ RETURN = r"""
result: result:
description: The utm object that was created description: The utm object that was created.
returned: success returned: success
type: complex type: complex
contains: contains:
_ref: _ref:
description: The reference name of the object description: The reference name of the object.
type: str type: str
_locked: _locked:
description: Whether or not the object is currently locked description: Whether or not the object is currently locked.
type: bool type: bool
_type: _type:
description: The type of the object description: The type of the object.
type: str type: str
name: name:
description: The name of the object description: The name of the object.
type: str type: str
access_control: access_control:
description: Whether to use access control state description: Whether to use access control state.
type: str type: str
allowed_networks: allowed_networks:
description: List of allowed network reference names description: List of allowed network reference names.
type: list type: list
auth_profile: auth_profile:
description: The auth profile reference name description: The auth profile reference name.
type: str type: str
backend: backend:
description: The backend reference name description: The backend reference name.
type: str type: str
be_path: be_path:
description: The backend path description: The backend path.
type: str type: str
comment: comment:
description: The comment string description: The comment string.
type: str type: str
denied_networks: denied_networks:
description: The list of the denied network names description: The list of the denied network names.
type: list type: list
hot_standby: hot_standby:
description: Use hot standby description: Use hot standby.
type: bool type: bool
path: path:
description: Path name description: Path name.
type: str type: str
status: status:
description: Whether the object is active or not description: Whether the object is active or not.
type: bool type: bool
stickysession_id: stickysession_id:
description: The identifier of the stickysession description: The identifier of the stickysession.
type: str type: str
stickysession_status: stickysession_status:
description: Whether to use stickysession or not description: Whether to use stickysession or not.
type: bool type: bool
websocket_passthrough: websocket_passthrough:
description: Whether websocket passthrough will be used or not description: Whether websocket passthrough will be used or not.
type: bool type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule from ansible_collections.community.general.plugins.module_utils.utm_utils import UTM, UTMModule