community.general.utm_proxy_location (8.5.0) — module

Create, update or destroy reverse_proxy location entry in Sophos UTM

Authors: Johannes Brunswicker (@MatrixCrawler)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create UTM proxy_location
  utm_proxy_backend:
    utm_host: sophos.host.name
    utm_token: abcdefghijklmno1234
    name: TestLocationEntry
    backend: REF_OBJECT_STRING
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove UTM proxy_location
  utm_proxy_backend:
    utm_host: sophos.host.name
    utm_token: abcdefghijklmno1234
    name: TestLocationEntry
    state: absent

Inputs

    
name:
    description:
    - The name of the object. Will be used to identify the entry
    required: true
    type: str

path:
    default: /
    description:
    - The path of the location
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - The desired state of the object.
    - V(present) will create or update an object.
    - V(absent) will delete an object if it was present.
    type: str

status:
    default: true
    description:
    - Whether the location is active or not
    type: bool

backend:
    default: []
    description:
    - A list of backends that are connected with this location declaration
    elements: str
    type: list

be_path:
    default: ''
    description:
    - The path of the backend
    type: str

comment:
    default: ''
    description:
    - The optional comment string
    type: str

headers:
    default: {}
    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

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

hot_standby:
    default: false
    description:
    - Activate hot standby mode
    type: bool

auth_profile:
    default: ''
    description:
    - The reference name of the auth profile
    type: str

utm_protocol:
    choices:
    - http
    - https
    default: https
    description:
    - The protocol of the REST Endpoint.
    type: str

access_control:
    choices:
    - '0'
    - '1'
    default: '0'
    description:
    - whether to activate the access control for the location
    type: str

validate_certs:
    default: true
    description:
    - Whether the REST interface's ssl certificate should be verified or not.
    type: bool

denied_networks:
    default: []
    description:
    - A list of denied network references
    elements: str
    type: list

allowed_networks:
    default:
    - REF_NetworkAny
    description:
    - A list of allowed networks
    elements: str
    type: list

stickysession_id:
    default: ROUTEID
    description:
    - The stickysession id
    type: str

stickysession_status:
    default: false
    description:
    - Enable the stickysession
    type: bool

websocket_passthrough:
    default: false
    description:
    - Enable the websocket passthrough
    type: bool

Outputs

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
    access_control:
      description: Whether to use access control state
      type: str
    allowed_networks:
      description: List of allowed network reference names
      type: list
    auth_profile:
      description: The auth profile reference name
      type: str
    backend:
      description: The backend reference name
      type: str
    be_path:
      description: The backend path
      type: str
    comment:
      description: The comment string
      type: str
    denied_networks:
      description: The list of the denied network names
      type: list
    hot_standby:
      description: Use hot standby
      type: bool
    name:
      description: The name of the object
      type: str
    path:
      description: Path name
      type: str
    status:
      description: Whether the object is active or not
      type: bool
    stickysession_id:
      description: The identifier of the stickysession
      type: str
    stickysession_status:
      description: Whether to use stickysession or not
      type: bool
    websocket_passthrough:
      description: Whether websocket passthrough will be used or not
      type: bool
  description: The utm object that was created
  returned: success
  type: complex