zabbix_proxy – Create/delete/get/update Zabbix proxies — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# zabbix_proxy – Create/delete/get/update Zabbix proxies

New in version 2.5.

- Synopsis
- Requirements
- Parameters
- Notes
- Examples
- Status

## Synopsis

- This module allows you to create, modify, get and delete Zabbix proxy entries.

## Requirements

The below requirements are needed on the host that executes this module.

- python >= 2.6
- zabbix-api >= 0.5.4

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
ca_cert string |  | Certificate issuer. aliases: tls_issuer
description string |  | Description of the proxy.
http_login_password string |  | Basic Auth password
http_login_user string / required |  | Basic Auth login
interface dictionary | Default: {} | Dictionary with params for the interface when proxy is in passive mode Available values are: dns, ip, main, port, type and useip. Please review the interface documentation for more information on the supported properties https://www.zabbix.com/documentation/3.2/manual/api/reference/proxy/object#proxy_interface
login_password string / required |  | Zabbix user password.
login_user string / required |  | Zabbix user name.
proxy_name string / required |  | Name of the proxy in Zabbix.
server_url string / required |  | URL of Zabbix server, with protocol (http or https). `url` is an alias for `server_url`. aliases: url
state string | Choices: present ← absent | State of the proxy. On `present`, it will create if proxy does not exist or update the proxy if the associated data is different. On `absent` will remove a proxy if it exists.
status string | Choices: active ← passive | Type of proxy. (4 - active, 5 - passive)
timeout integer | Default: 10 | The timeout of API request (seconds).
tls_accept string | Choices: no_encryption ← PSK certificate | Connections from proxy.
tls_connect string | Choices: no_encryption ← PSK certificate | Connections to proxy.
tls_psk string |  | The preshared key, at least 32 hex digits. Required if either tls_connect or tls_accept has PSK enabled.
tls_psk_identity string |  | PSK identity. Required if either tls_connect or tls_accept has PSK enabled.
tls_subject string |  | Certificate subject.
validate_certs boolean added in 2.5 | Choices: no yes ← | If set to False, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

## Notes

Note

- If you use login_password=zabbix, the word “zabbix” is replaced by “****” in all module output, because login_password uses `no_log`. See this FAQ for more information.

## Examples

    - name: Create a new proxy or update an existing proxy
      local_action:
        module: zabbix_proxy
        server_url: http://monitor.example.com
        login_user: username
        login_password: password
        proxy_name: ExampleProxy
        description: ExampleProxy
        status: active
        state: present
        interface:
            type: 0
            main: 1
            useip: 1
            ip: 10.xx.xx.xx
            dns: ""
            port: 10050

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]

### Authors

- Alen Komic (@akomic)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.