zabbix / zabbix.zabbix / 1.3.6 / httpapi / zabbix Zabbix HTTP API plugin Authors: Zabbix Ltd (@zabbix)zabbix.zabbix.zabbix (1.3.6) — httpapi
Install with ansible-galaxy collection install zabbix.zabbix:==1.3.6
collections: - name: zabbix.zabbix version: 1.3.6
This plugin is designed to work with Zabbix API.
# You can configure Zabbix API connection settings with the following parameters: - name: Create host groups zabbix.zabbix.zabbix_group: state: present host_groups: - Group 1 vars: # Connection parameters ansible_host: zabbix-api.com # Specifying Zabbix API address. You can also use 'delegate_to'. ansible_connection: httpapi # Specifying to use HTTP API plugin. ansible_network_os: zabbix.zabbix.zabbix # Specifying which HTTP API plugin to use. ansible_httpapi_port: 80 # Specifying the port for connecting to Zabbix API. ansible_httpapi_use_ssl: False # Specifying the type of connection. True for https, False for http (by default). ansible_httpapi_validate_certs: False # Specifying certificate validation. # User parameters for connecting to Zabbix API ansible_user: Admin # Username to connect to Zabbix API. ansible_httpapi_pass: zabbix # Password to connect to Zabbix API. # Token for connecting to Zabbix API zabbix_api_token: your_secret_token # Specify your token to connect to Zabbix API. # Path to connect to Zabbix API zabbix_api_url: '/zabbix' # The field is empty by default. You can specify your connection path (e.g., '/zabbix'). # User parameters for basic HTTP authorization # These options only affect the basic HTTP authorization configured on the web server. http_login: my_http_login # Username for connecting to API in case of additional basic HTTP authorization. http_password: my_http_password # Password for connecting to API in case of additional basic HTTP authorization.
# Example of using options to create a host group # For a typical application, it is enough to specify only a few parameters - name: Create host groups zabbix.zabbix.zabbix_group: state: present host_groups: - G1 - G2 vars: ansible_network_os: zabbix.zabbix.zabbix ansible_connection: httpapi ansible_user: Admin ansible_httpapi_pass: zabbix
http_login: description: Username for basic HTTP authorization to Zabbix API type: str vars: - name: http_login http_password: description: Password for basic HTTP authorization to Zabbix API type: str vars: - name: http_password zabbix_api_url: description: Path to access Zabbix API env: - name: ZABBIX_API_URL type: str vars: - name: zabbix_api_url zabbix_api_token: description: Token for authorization in Zabbix API env: - name: ZABBIX_API_TOKEN type: str vars: - name: zabbix_api_token