|
@@ -16,18 +16,21 @@
|
|
|
|
|
|
- debug: var=lzbx_applications
|
|
|
|
|
|
-- 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
|
|
|
+#
|
|
|
+# 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 Items
|
|
|
zbx_item:
|
|
@@ -38,24 +41,19 @@
|
|
|
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
|
|
|
|
|
|
-#- debug: var=ctp_created_items
|
|
|
-
|
|
|
- name: Create Triggers
|
|
|
zbx_trigger:
|
|
|
zbx_server: "{{ server }}"
|
|
|
zbx_user: "{{ user }}"
|
|
|
zbx_password: "{{ password }}"
|
|
|
description: "{{ item.description }}"
|
|
|
+ dependencies: "{{ item.dependencies | default([], true) }}"
|
|
|
expression: "{{ item.expression }}"
|
|
|
priority: "{{ item.priority }}"
|
|
|
with_items: template.ztriggers
|
|
|
when: template.ztriggers is defined
|
|
|
-
|
|
|
-#- debug: var=ctp_created_triggers
|
|
|
-
|
|
|
-
|