community / community.zabbix / 1.8.0 / module / zabbix_valuemap Create/update/delete Zabbix value maps Authors: Ruben Tsirunyan (@rubentsirunyan)community.zabbix.zabbix_valuemap (1.8.0) — module
Install with ansible-galaxy collection install community.zabbix:==1.8.0
collections: - name: community.zabbix version: 1.8.0
This module allows you to create, modify and delete Zabbix value maps.
- name: Create a value map local_action: module: community.zabbix.zabbix_valuemap server_url: http://zabbix.example.com login_user: username login_password: password name: Numbers mappings: - value: 1 map_to: one - value: 2 map_to: two state: present
name: description: - Name of the value map. required: true type: str state: choices: - present - absent default: present description: - State of the value map. - On C(present), it will create a value map if it does not exist or update the value map if the associated data is different. - On C(absent), it will remove the value map if it exists. type: str timeout: default: 10 description: - The timeout of API request (seconds). type: int mappings: description: - List of value mappings for the value map. - Required when I(state=present). elements: dict suboptions: map_to: description: Value to which the original value is mapped to. required: true type: str value: description: Original value. required: true type: str type: list 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 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 http_login_password: description: - Basic Auth password type: str