summaryrefslogtreecommitdiffstats
path: root/roles/lib_zabbix/tasks
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-09-01 10:22:22 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-09-01 11:18:45 -0400
commitd39837b2be8ce6abfa8c69d7cc83f04c6130ccd5 (patch)
treeddefc0d107482ada21467236794bd4265c536f48 /roles/lib_zabbix/tasks
parente2846ae93872c1779e26810eafc0745453f0bb05 (diff)
downloadopenshift-d39837b2be8ce6abfa8c69d7cc83f04c6130ccd5.tar.gz
openshift-d39837b2be8ce6abfa8c69d7cc83f04c6130ccd5.tar.bz2
openshift-d39837b2be8ce6abfa8c69d7cc83f04c6130ccd5.tar.xz
openshift-d39837b2be8ce6abfa8c69d7cc83f04c6130ccd5.zip
Fix for zbx applications
Diffstat (limited to 'roles/lib_zabbix/tasks')
-rw-r--r--roles/lib_zabbix/tasks/create_template.yml32
1 files changed, 11 insertions, 21 deletions
diff --git a/roles/lib_zabbix/tasks/create_template.yml b/roles/lib_zabbix/tasks/create_template.yml
index 444fd0a14..630d5dd70 100644
--- a/roles/lib_zabbix/tasks/create_template.yml
+++ b/roles/lib_zabbix/tasks/create_template.yml
@@ -1,6 +1,4 @@
---
-- debug: var=template
-
- name: Template Create Template
zbx_template:
zbx_server: "{{ server }}"
@@ -9,28 +7,20 @@
name: "{{ template.name }}"
register: created_template
-- debug: var=created_template
- set_fact:
lzbx_applications: "{{ template.zitems | oo_select_keys_from_list(['applications']) | oo_flatten | unique }}"
-- debug: var=lzbx_applications
-
-#
-# twiest: This is commented out because it doesn't work correctly
-#
-#- name: Create Application
-# zbx_application:
-# zbx_server: "{{ server }}"
-# zbx_user: "{{ user }}"
-# zbx_password: "{{ password }}"
-# name: "{{ item }}"
-# template_name: "{{ template.name }}"
-# with_items: lzbx_applications
-# register: created_application
-# when: template.zitems is defined
-
-#- debug: var=created_application
+- name: Create Application
+ zbx_application:
+ zbx_server: "{{ server }}"
+ zbx_user: "{{ user }}"
+ zbx_password: "{{ password }}"
+ name: "{{ item }}"
+ template_name: "{{ template.name }}"
+ with_items: lzbx_applications
+ register: created_application
+ when: template.zitems is defined
- name: Create Items
zbx_item:
@@ -41,7 +31,7 @@
name: "{{ item.name | default(item.key, true) }}"
value_type: "{{ item.value_type | default('int') }}"
template_name: "{{ template.name }}"
-# applications: "{{ item.applications }}"
+ applications: "{{ item.applications }}"
with_items: template.zitems
register: created_items
when: template.zitems is defined