community.zabbix.zabbix_autoregister (1.8.0) — module

Update Zabbix autoregistration

| "added in version" 1.6.0 of community.zabbix"

Authors: ONODERA Masaru(@masa-orca)

Install collection

Install with ansible-galaxy collection install community.zabbix:==1.8.0


Add to requirements.yml

  collections:
    - name: community.zabbix
      version: 1.8.0

Description

This module allows you to modify Zabbix autoregistration.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update autoregistration
  community.zabbix.zabbix_autoregister:
    server_url: "http://zabbix.example.com/zabbix/"
    login_user: Admin
    login_password: secret
    tls_accept:
      - unsecure
      - tls_with_psk
    tls_psk_identity: 'PSK 001'
    tls_psk: "11111595725ac58dd977beef14b97461a7c1045b9a1c923453302c5473193478"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set unsecure to tls_accept
  community.zabbix.zabbix_autoregister:
    server_url: "http://zabbix.example.com/zabbix/"
    login_user: Admin
    login_password: secret
    tls_accept: unsecure

Inputs

    
timeout:
    default: 10
    description:
    - The timeout of API request (seconds).
    type: int

tls_psk:
    description:
    - TLS connection uses this PSK value.
    - This setting requires I(tls_accept=tls_with_psk) if current value of I(tls_accept)
      is C(unsecure).
    type: str

login_user:
    description:
    - Zabbix user name.
    - If not set the environment variable C(ZABBIX_USERNAME) will be used.
    required: true
    type: str

server_url:
    aliases:
    - url
    description:
    - URL of Zabbix server, with protocol (http or https). C(url) is an alias for C(server_url).
    - If not set the environment variable C(ZABBIX_SERVER) will be used.
    required: true
    type: str

tls_accept:
    description:
    - Type of allowed incoming connections for autoregistration.
    - Choose from C(unsecure), C(tls_with_psk) or both.
    elements: str
    required: true
    type: list

login_password:
    description:
    - Zabbix user password.
    - If not set the environment variable C(ZABBIX_PASSWORD) will be used.
    required: true
    type: str

validate_certs:
    default: true
    description:
    - If set to False, SSL certificates will not be validated. This should only be used
      on personally controlled sites using self-signed certificates.
    - If not set the environment variable C(ZABBIX_VALIDATE_CERTS) will be used.
    type: bool

http_login_user:
    description:
    - Basic Auth login
    type: str

tls_psk_identity:
    description:
    - TLS connection uses this PSK identity string.
    - The PSK identity string will be transmitted unencrypted over the network. Therefore,
      you should not put any sensitive information here.
    - This setting requires I(tls_accept=tls_with_psk) if current value of I(tls_accept)
      is C(unsecure).
    type: str

http_login_password:
    description:
    - Basic Auth password
    type: str

Outputs

msg:
  description: The result of the operation
  returned: success
  sample: Successfully updated global autoregistration setting
  type: str