community.general.zabbix_valuemap (0.1.1) — module

Create/update/delete Zabbix value maps

Authors: Ruben Tsirunyan (@rubentsirunyan)

preview | supported by community

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module allows you to create, modify and delete Zabbix value maps.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a value map
  local_action:
    module: 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

Inputs

    
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.
    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).
    required: true
    type: str

login_password:
    description:
    - Zabbix user password.
    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.
    type: bool

http_login_user:
    description:
    - Basic Auth login
    type: str

http_login_password:
    description:
    - Basic Auth password
    type: str