summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/os_zabbix/library/zbx_item.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/os_zabbix/library/zbx_item.py b/roles/os_zabbix/library/zbx_item.py
index 6cfb16d48..57ec06463 100644
--- a/roles/os_zabbix/library/zbx_item.py
+++ b/roles/os_zabbix/library/zbx_item.py
@@ -119,7 +119,7 @@ def main():
module.exit_json(changed=True, results=content['result'], state="absent")
if state == 'present':
- params = {'name': module.params['name'],
+ params = {'name': module.params.get('name', module.params['key']),
'key_': key,
'hostid': templateid,
'type': module.params['zabbix_type'],