diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-07-24 10:52:29 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-07-24 11:13:04 -0400 |
commit | 2a6fc886cc080ec1344d9ad4767f0fcde7ba3442 (patch) | |
tree | 85a5dc0e17c0d0c0a3d231ec808633ae05fdea7e /playbooks/adhoc/zabbix_setup/create_template.yml | |
parent | 97f96b71ff8abc2ccf38e745e124c68b91a71146 (diff) | |
download | openshift-2a6fc886cc080ec1344d9ad4767f0fcde7ba3442.tar.gz openshift-2a6fc886cc080ec1344d9ad4767f0fcde7ba3442.tar.bz2 openshift-2a6fc886cc080ec1344d9ad4767f0fcde7ba3442.tar.xz openshift-2a6fc886cc080ec1344d9ad4767f0fcde7ba3442.zip |
Adding initial zabbix setup
Diffstat (limited to 'playbooks/adhoc/zabbix_setup/create_template.yml')
-rw-r--r-- | playbooks/adhoc/zabbix_setup/create_template.yml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/playbooks/adhoc/zabbix_setup/create_template.yml b/playbooks/adhoc/zabbix_setup/create_template.yml new file mode 100644 index 000000000..07724d5b7 --- /dev/null +++ b/playbooks/adhoc/zabbix_setup/create_template.yml @@ -0,0 +1,59 @@ +--- +- debug: var=ctp_template + +- name: Create Template + zbxapi: + server: "{{ ctp_zserver }}" + user: "{{ ctp_zuser }}" + password: "{{ ctp_zpassword }}" + zbx_class: Template + state: present + params: "{{ ctp_template.params }}" + register: ctp_created_templates + +- debug: var=ctp_created_templates + +#- name: Create Application +# zbxapi: +# server: "{{ ctp_zserver }}" +# user: "{{ ctp_zuser }}" +# password: "{{ ctp_zpassword }}" +# zbx_class: Application +# state: present +# params: +# name: "{{ ctp_template.application.name}}" +# hostid: "{{ ctp_created_templates.results[0].templateid }}" +# search: +# name: "{{ ctp_template.application.name}}" +# register: ctp_created_application + +- debug: var=ctp_created_application + +- name: Create Items + zbxapi: + server: "{{ ctp_zserver }}" + user: "{{ ctp_zuser }}" + password: "{{ ctp_zpassword }}" + zbx_class: Item + state: present + params: "{{ item | oo_set_zbx_item_hostid(ctp_created_templates.results) }}" + with_items: ctp_template.zitems + register: ctp_created_items + +- debug: var=ctp_created_items + +- name: Create Triggers + zbxapi: + server: "{{ ctp_zserver }}" + user: "{{ ctp_zuser }}" + password: "{{ ctp_zpassword }}" + zbx_class: Trigger + state: present + params: "{{ item }}" + with_items: ctp_template.ztriggers + register: ctp_created_triggers + when: ctp_template.ztriggers is defined + +- debug: var=ctp_created_triggers + + |