Skip to content

Commit

Permalink
Remove References to Tags in LLD Rules (#1271)
Browse files Browse the repository at this point in the history
* remove references to non-existent tags call

* add fragment

---------

Co-authored-by: Andrew Lathrop <[email protected]>
  • Loading branch information
aplathrop and Andrew Lathrop authored Jun 4, 2024
1 parent f701aa0 commit c919e2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/pr_1269.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- remove references to tags in LLD rules
12 changes: 3 additions & 9 deletions plugins/modules/zabbix_discoveryrule.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
DOCUMENTATION = r'''
---
module: zabbix_discoveryrule
short_description: Create/delete Zabbix discovery rules
short_description: Create/delete Zabbix low-level discovery (LLD) rules
description:
- Create discoveryrules if they do not exist.
- Delete existing discoveryrules if they exist.
Expand Down Expand Up @@ -206,7 +206,7 @@
enabled: True
state: present
# Add tags to the existing Zabbix LLD rule
# Change interval for existing Zabbix LLD rule
- name: update rule
# set task level variables as we change ansible_connection plugin here
vars:
Expand All @@ -221,13 +221,7 @@
name: mounted_filesystem_discovery
template_name: example_template
params:
type: zabbix_agent
key: 'vfs.fs.discovery'
interval: 1h
enabled: True
tags:
- tag: class
value: application
interval: 2h
state: present
# Delete LLD rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
key: 'vfs.fs.discovery'
interval: 1m
enabled: True
tags:
- tag: tag
value: value
state: present
register: zbxhostrule_new

Expand All @@ -28,9 +25,6 @@
key: 'vfs.fs.discovery'
interval: 1m
enabled: True
tags:
- tag: tag
value: value
state: present
register: zbxhostrule_existing

Expand Down Expand Up @@ -82,9 +76,6 @@
key: 'vfs.fs.discovery'
interval: 1m
enabled: True
tags:
- tag: tag
value: value
state: present
register: zbxtemprule_new

Expand All @@ -101,9 +92,6 @@
key: 'vfs.fs.discovery'
interval: 1m
enabled: True
tags:
- tag: tag
value: value
state: present
register: zbxtemprule_existing

Expand Down

0 comments on commit c919e2e

Please sign in to comment.