blob: 1729194b5286232cfa173b5eaf4eb78841c740d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
---
- hosts: localhost
gather_facts: no
vars_files:
- vars/template_heartbeat.yml
- vars/template_os_linux.yml
vars:
g_zserver: http://localhost/zabbix/api_jsonrpc.php
g_zuser: Admin
g_zpassword: zabbix
roles:
- ../../../roles/os_zabbix
post_tasks:
- zbx_template:
server: "{{ g_zserver }}"
user: "{{ g_zuser }}"
password: "{{ g_zpassword }}"
state: list
register: templates
- debug: var=templates
- name: Include Template
include: create_template.yml
vars:
ctp_template: "{{ g_template_heartbeat }}"
ctp_zserver: "{{ g_zserver }}"
ctp_zuser: "{{ g_zuser }}"
ctp_zpassword: "{{ g_zpassword }}"
- name: Include Template
include: create_template.yml
vars:
ctp_template: "{{ g_template_os_linux }}"
ctp_zserver: "{{ g_zserver }}"
ctp_zuser: "{{ g_zuser }}"
ctp_zpassword: "{{ g_zpassword }}"
|