community / community.zabbix / 1.8.0 / inventory / zabbix_inventory Zabbix Inventory Plugin | "added in version" 1.4.0 of community.zabbix" Authors: Timothy Test (@ttestscripting)community.zabbix.zabbix_inventory (1.8.0) — inventory
Install with ansible-galaxy collection install community.zabbix:==1.8.0
collections: - name: community.zabbix version: 1.8.0
Zabbix Inventory plugin
All vars from zabbix are prefixed with zbx_
cache: default: false description: - Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. env: - name: ANSIBLE_INVENTORY_CACHE ini: - key: cache section: inventory type: bool proxy: default: '' description: Proxy server to use for reaching zabbix API type: string groups: default: {} description: Add hosts to group based on Jinja2 conditionals. type: dict strict: default: false description: - If V(yes) make invalid entries a fatal error, otherwise skip and continue. - Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. type: bool compose: default: {} description: Create vars from jinja2 expressions. type: dict timeout: default: 10 description: - The timeout of API request (seconds). type: int login_user: description: - Zabbix user name. env: - name: ZABBIX_USERNAME 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). env: - name: ZABBIX_SERVER required: true type: str cache_plugin: default: memory description: - Cache plugin to use for the inventory's source data. env: - name: ANSIBLE_CACHE_PLUGIN - name: ANSIBLE_INVENTORY_CACHE_PLUGIN ini: - key: fact_caching section: defaults - key: cache_plugin section: inventory type: str cache_prefix: default: ansible_inventory_ description: - Prefix to use for cache plugin files/tables env: - name: ANSIBLE_CACHE_PLUGIN_PREFIX - name: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX ini: - key: fact_caching_prefix section: defaults - key: cache_prefix section: inventory keyed_groups: default: [] description: Add hosts to group based on the values of a variable. elements: dict suboptions: default_value: description: - The default value when the host variable's value is an empty string. - This option is mutually exclusive with O(keyed_groups[].trailing_separator). type: str version_added: '2.12' version_added_collection: ansible.builtin key: description: - The key from input dictionary used to generate groups type: str parent_group: description: parent group for keyed group type: str prefix: default: '' description: A keyed group name will start with this prefix type: str separator: default: _ description: separator used to build the keyed group name type: str trailing_separator: default: true description: - Set this option to V(False) to omit the O(keyed_groups[].separator) after the host variable when the value is an empty string. - This option is mutually exclusive with O(keyed_groups[].default_value). type: bool version_added: '2.12' version_added_collection: ansible.builtin type: list cache_timeout: default: 3600 description: - Cache duration in seconds env: - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT - name: ANSIBLE_INVENTORY_CACHE_TIMEOUT ini: - key: fact_caching_timeout section: defaults - key: cache_timeout section: inventory type: int login_password: description: - Zabbix user password. env: - name: ZABBIX_PASSWORD required: true type: str use_extra_vars: default: false description: Merge extra vars into the available variables for composition (highest precedence). env: - name: ANSIBLE_INVENTORY_USE_EXTRA_VARS ini: - key: use_extra_vars section: inventory_plugins type: bool version_added: '2.11' version_added_collection: ansible.builtin 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. env: - name: ZABBIX_VALIDATE_CERTS type: bool host_zapi_query: default: {} description: - API query for hosts - see zabbix documentation for more details U(https://www.zabbix.com/documentation/current/manual/api/reference/host/get) suboptions: selectApplications: description: - query - Return an applications property with host applications. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/application/object) for more details on field names type: str selectDashboards: description: - query - Return a dashboards property. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/templatedashboard/object) for more details on field names type: str selectDiscoveries: description: - query - Return a discoveries property with host low-level discovery rules. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/discoveryrule/object) for more details on field names type: str selectDiscoveryRule: description: - query - Return a discoveryRule property with the low-level discovery rule that created the host (from host prototype in VMware monitoring). - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - please see U(https://www.zabbix.com/documentation/current/manual/api/reference/discoveryrule/object) for more details on field names type: str selectGraphs: description: - query - Return a discoveries property with host low-level discovery rules. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/graph/object) for more details on field names type: str selectGroups: description: - query - Return a groups property with host groups data that the host belongs to. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/hostgroup/object) for more details on field names type: str selectHostDiscovery: description: - query - Return a hostDiscovery property with host discovery object data. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/host/get) for more details on field names type: str selectHttpTests: description: - query - Return an httpTests property with host web scenarios. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/httptest/object) for more details on field names type: str selectInheritedTags: description: - query - Return an inheritedTags property with tags that are on all templates which are linked to host. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/host/object#host_tag) for more details on field names type: str selectInterfaces: description: - query - Return an interfaces property with host interfaces. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/hostinterface/object) for more details on field names type: str selectInventory: description: - query - Return an inventory property with host inventory data. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/host/object#host_inventory) for more details on field names type: str selectItems: description: - query - Return an items property with host items. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/item/object) for more details on field names type: str selectMacros: description: - query - Return a macros property with host macros. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/usermacro/object) for more details on field names type: str selectParentTemplates: description: - query - Return a parentTemplates property with templates that the host is linked to - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/template/object) for more details on field names type: str selectTags: description: - query - Return a tags property with host tags. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/host/object#host_tag) for more details on field names type: str selectTriggers: description: - query - Return a triggers property with host triggers. - To return all values specify 'extend' - Can be limited to different fields for example setting the vaule to ['name'] will only return the name - Additional fields can be specified by comma seperated value ['name', 'field2'] - Please see U(https://www.zabbix.com/documentation/current/manual/api/reference/host/object#host_tag) for more details on field names type: str type: dict http_login_user: description: - Basic Auth login type: str cache_connection: description: - Cache connection data or path, read cache plugin documentation for specifics. env: - name: ANSIBLE_CACHE_PLUGIN_CONNECTION - name: ANSIBLE_INVENTORY_CACHE_CONNECTION ini: - key: fact_caching_connection section: defaults - key: cache_connection section: inventory type: str add_zabbix_groups: default: false description: - If set to True, hosts will be added to groups based on their zabbix groups type: bool leading_separator: default: true description: - Use in conjunction with keyed_groups. - By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. - This is because the default prefix is "" and the default separator is "_". - Set this option to False to omit the leading underscore (or other separator) if no prefix is given. - If the group name is derived from a mapping the separator is still used to concatenate the items. - To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. type: boolean version_added: '2.11' version_added_collection: ansible.builtin http_login_password: description: - Basic Auth password type: str