ansible.builtin.zabbix_host_facts (v2.7.9) — module

Gather facts about Zabbix host

| "added in version" 2.7 of ansible.builtin"

Authors: (@redwhitemiko)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.7.9

Description

This module allows you to search for Zabbix host entries.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get host info
  local_action:
    module: zabbix_host_facts
    server_url: http://monitor.example.com
    login_user: username
    login_password: password
    host_name: ExampleHost
    host_ip: 127.0.0.1
    timeout: 10
    exact_match: no
    remove_duplicate: yes

Inputs

    
host_ip:
    description:
    - Host interface IP of the host in Zabbix.
    required: false

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

host_name:
    description:
    - Name of the host in Zabbix.
    - host_name is the unique identifier used and cannot be updated using this module.
    required: true

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

exact_match:
    default: false
    description:
    - Find the exact match
    type: bool

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

remove_duplicate:
    default: true
    description:
    - Remove duplicate host from host result
    type: bool

http_login_password:
    description:
    - Basic Auth password
    type: str

Outputs

hosts:
  description: List of Zabbix host. See https://www.zabbix.com/documentation/3.4/manual/api/reference/host/get
    for list of host values.
  returned: success
  sample:
  - '...': null
    available: '1'
    description: ''
    disable_until: '0'
    error: ''
    flags: '0'
    groups:
    - '1'
    host: Host A
  type: dict