ansible / ansible.builtin / v2.9.25 / module / utm_ca_host_key_cert create, update or destroy ca host_key_cert entry in Sophos UTM | "added in version" 2.8 of ansible.builtin" Authors: Stephan Schwarz (@stearz) preview | supported by communityansible.builtin.utm_ca_host_key_cert (v2.9.25) — module
pip
Install with pip install ansible==2.9.25
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.
# Create a ca_host_key_cert entry - name: utm ca_host_key_cert utm_ca_host_key_cert: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestHostKeyCertEntry ca: REF_ca/signing_ca_OBJECT_STRING meta: REF_ca/meta_x509_OBJECT_STRING certificate: | --- BEGIN CERTIFICATE --- . . . . . . . . . --- END CERTIFICATE --- state: present
# Remove a ca_host_key_cert entry - name: utm ca_host_key_cert utm_ca_host_key_cert: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestHostKeyCertEntry state: absent
# Read a ca_host_key_cert entry - name: utm ca_host_key_cert utm_ca_host_key_cert: utm_host: sophos.host.name utm_token: abcdefghijklmno1234 name: TestHostKeyCertEntry state: info
ca: description: - A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object. required: true key: description: - Optional private key in PEM format. meta: description: - A reference to an existing utm_ca_meta_x509 object. required: true 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 comment: description: - Optional comment string. headers: description: - A dictionary of additional headers to be sent to POST and PUT requests. - Is needed for some modules required: false type: dict 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 encrypted: default: false description: - Optionally enable encryption. 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 certificate: description: - The certificate in PEM format. required: true 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 _type: description: The type of the object type: str ca: description: A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object. type: str certificate: description: The certificate in PEM format type: str comment: description: Comment string (may be empty string) type: str encrypted: description: If encryption is enabled type: bool key: description: Private key in PEM format (may be empty string) type: str meta: description: A reference to an existing utm_ca_meta_x509 object. type: str name: description: The name of the object type: str description: The utm object that was created returned: success type: complex