diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-10-02 12:59:52 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-10-02 12:59:52 -0400 |
commit | c443f3fc1b901b72a58e0e28b5a280cec205cbbd (patch) | |
tree | c86ab69cda7d6a1402c779968bb20b41c8fd4012 /roles/lib_zabbix/tasks | |
parent | fe5da92d3772802dc50d0bbe602e67cc3b5c7dec (diff) | |
parent | e40b829103db88072c0e5fc759bff239cb214a43 (diff) | |
download | openshift-c443f3fc1b901b72a58e0e28b5a280cec205cbbd.tar.gz openshift-c443f3fc1b901b72a58e0e28b5a280cec205cbbd.tar.bz2 openshift-c443f3fc1b901b72a58e0e28b5a280cec205cbbd.tar.xz openshift-c443f3fc1b901b72a58e0e28b5a280cec205cbbd.zip |
Merge pull request #651 from twiest/cpr
added Template Ops Tools
Diffstat (limited to 'roles/lib_zabbix/tasks')
-rw-r--r-- | roles/lib_zabbix/tasks/create_template.yml | 9 |
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: |