summaryrefslogtreecommitdiffstats
path: root/roles/lib_zabbix/tasks
diff options
context:
space:
mode:
authorThomas Wiest <twiest@redhat.com>2015-09-30 15:22:36 -0400
committerThomas Wiest <twiest@redhat.com>2015-10-02 12:44:31 -0400
commite40b829103db88072c0e5fc759bff239cb214a43 (patch)
treec86ab69cda7d6a1402c779968bb20b41c8fd4012 /roles/lib_zabbix/tasks
parentfe5da92d3772802dc50d0bbe602e67cc3b5c7dec (diff)
downloadopenshift-e40b829103db88072c0e5fc759bff239cb214a43.tar.gz
openshift-e40b829103db88072c0e5fc759bff239cb214a43.tar.bz2
openshift-e40b829103db88072c0e5fc759bff239cb214a43.tar.xz
openshift-e40b829103db88072c0e5fc759bff239cb214a43.zip
added Template Ops Tools
Diffstat (limited to 'roles/lib_zabbix/tasks')
-rw-r--r--roles/lib_zabbix/tasks/create_template.yml9
1 files changed, 6 insertions, 3 deletions
diff --git a/roles/lib_zabbix/tasks/create_template.yml b/roles/lib_zabbix/tasks/create_template.yml
index 62259b680..41381e76c 100644
--- a/roles/lib_zabbix/tasks/create_template.yml
+++ b/roles/lib_zabbix/tasks/create_template.yml
@@ -9,7 +9,8 @@
- set_fact:
- lzbx_applications: "{{ template.zitems | oo_select_keys_from_list(['applications']) | oo_flatten | unique }}"
+ lzbx_item_applications: "{{ template.zitems | default([], True) | oo_select_keys_from_list(['applications']) | oo_flatten | unique }}"
+ lzbx_itemprototype_applications: "{{ template.zitemprototypes | default([], True) | oo_select_keys_from_list(['applications']) | oo_flatten | unique }}"
- name: Create Application
zbx_application:
@@ -18,9 +19,11 @@
zbx_password: "{{ password }}"
name: "{{ item }}"
template_name: "{{ template.name }}"
- with_items: lzbx_applications
+ with_items:
+ - "{{ lzbx_item_applications }}"
+ - "{{ lzbx_itemprototype_applications }}"
register: created_application
- when: template.zitems is defined
+ when: template.zitems is defined or template.zitemprototypes is defined
- name: Create Items
zbx_item: