community / community.general / 0.1.4 / module / utm_dns_host create, update or destroy dns entry in Sophos UTM Authors: Johannes Brunswicker (@MatrixCrawler)community.general.utm_dns_host (0.1.4) — module
Install with ansible-galaxy collection install community.general:==0.1.4
collections: - name: community.general version: 0.1.4
Create, update or destroy a dns entry in SOPHOS UTM.
This module needs to have the REST Ability of the UTM to be activated.
- name: Create UTM dns host entry utm_dns_host: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestDNSEntry hostname: testentry.some.tld state: present
- name: Remove UTM dns host entry utm_dns_host: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestDNSEntry state: absent
name: description: - The name of the object. Will be used to identify the entry required: true state: choices: - absent - present default: present description: - The desired state of the object. - C(present) will create or update an object - C(absent) will delete an object if it was present type: str address: default: 0.0.0.0 description: - The IPV4 Address of the entry. Can be left empty for automatic resolving. comment: description: - An optional comment to add to the dns host object headers: description: - A dictionary of additional headers to be sent to POST and PUT requests. - Is needed for some modules required: false type: dict timeout: default: 0 description: - the timeout for the utm to resolve the ip address for the hostname again address6: default: '::' description: - The IPV6 Address of the entry. Can be left empty for automatic resolving. hostname: description: - The hostname for the dns host object resolved: default: false description: - whether the hostname's ipv4 address is already resolved or not type: bool utm_host: description: - The REST Endpoint of the Sophos UTM. required: true type: str utm_port: default: 4444 description: - The port of the REST interface. type: int interface: description: - The reference name of the interface to use. If not provided the default interface will be used resolved6: default: false description: - whether the hostname's ipv6 address is already resolved or not type: bool utm_token: description: - The token used to identify at the REST-API. See U(https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en), Chapter 2.4.2. required: true type: str utm_protocol: choices: - http - https default: https description: - The protocol of the REST Endpoint. type: str validate_certs: default: true description: - Whether the REST interface's ssl certificate should be verified or not. type: bool
result: contains: _locked: description: Whether or not the object is currently locked type: bool _ref: description: The reference name of the object type: str address: description: The ipv4 address of the object type: str address6: description: The ipv6 address of the object type: str comment: description: The comment string type: str hostname: description: The hostname of the object type: str interface: description: The reference name of the interface the object is associated with type: str name: description: The name of the object type: str resolved: description: Whether the ipv4 address is resolved or not type: bool resolved6: description: Whether the ipv6 address is resolved or not type: bool timeout: description: The timeout until a new resolving will be attempted type: int description: The utm object that was created returned: success type: complex