Skip to content

Commit 59af602

Browse files
committed
add ansible role zabbix_data_sync
1 parent dbb4f16 commit 59af602

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- name: "Restart the host monitoring service"
3+
service:
4+
name: oso-rhel7-host-monitoring.service
5+
state: restarted
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../lib_zabbix/library
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
- name: Get a list of hosts from zabbix in the zabbix hostgroup
2+
zbx_hostgroup:
3+
zbx_server: "{{ zabbix_url }}"
4+
zbx_user: "{{ zabbix_user }}"
5+
zbx_password: "{{ zabbix_pass }}"
6+
name: "{{ oo_clusterid }}"
7+
state: list
8+
show_hosts: true
9+
register: zabbix_cluster_hostgroup
10+
run_once: True
11+
ignore_errors: True
12+
delegate_to: localhost
13+
14+
- debug: var=zabbix_cluster_hostgroup.results[0].hosts|length
15+
16+
- set_fact:
17+
zabbix_host_inventory: "{{ zabbix_cluster_hostgroup.results[0].hosts }}"
18+
19+
- name: "copy file on /etc/openshift_tools"
20+
template:
21+
src: zabbix_data_sync.py.j2
22+
dest: /etc/openshift_tools/zabbix_data_sync.py
23+
owner: root
24+
group: root
25+
mode: 0644
26+
notify:
27+
- "Restart the host monitoring service"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
zabbix_data_sync_inventory_hosts = {{ zabbix_host_inventory }}
2+
cluster_desired_compute_size = {{ openshift_aws_compute_group_desired_size }}
3+
cluster_desired_infra_size = {{ openshift_aws_infra_group_desired_size }}
4+
cluster_desired_master_size = {{ openshift_aws_master_group_desired_size }}

0 commit comments

Comments
 (0)