|
@ -3,7 +3,7 @@ |
|
|
## |
|
|
## |
|
|
## Role to install xymon client or xymon server on host depending what is needed |
|
|
## Role to install xymon client or xymon server on host depending what is needed |
|
|
## |
|
|
## |
|
|
## Tags : |
|
|
|
|
|
|
|
|
## Tags : |
|
|
## - xymon-server : binaries and configuration server side |
|
|
## - xymon-server : binaries and configuration server side |
|
|
## - xymon-client : binaries and configuration client side (need a working server) |
|
|
## - xymon-client : binaries and configuration client side (need a working server) |
|
|
## - client-configuration : used to configure client only (no binaries) |
|
|
## - client-configuration : used to configure client only (no binaries) |
|
@ -15,39 +15,39 @@ |
|
|
##Check vars |
|
|
##Check vars |
|
|
- name: check xymon_server |
|
|
- name: check xymon_server |
|
|
fail: msg="Missing variable xymon_server" |
|
|
fail: msg="Missing variable xymon_server" |
|
|
tags: |
|
|
|
|
|
|
|
|
tags: |
|
|
- xymon-client |
|
|
- xymon-client |
|
|
- xymon-server |
|
|
- xymon-server |
|
|
when: xymon_server is not defined |
|
|
when: xymon_server is not defined |
|
|
|
|
|
|
|
|
- name: check xymon_checks |
|
|
- name: check xymon_checks |
|
|
fail: msg="Missing variable xymon_checks" |
|
|
fail: msg="Missing variable xymon_checks" |
|
|
tags: |
|
|
|
|
|
|
|
|
tags: |
|
|
- xymon-client |
|
|
- xymon-client |
|
|
- client-configuration |
|
|
- client-configuration |
|
|
when: xymon_checks is not defined |
|
|
when: xymon_checks is not defined |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: check monitoring_ip |
|
|
- name: check monitoring_ip |
|
|
fail: msg="Missing variable monitoring_ip" |
|
|
fail: msg="Missing variable monitoring_ip" |
|
|
tags: |
|
|
|
|
|
|
|
|
tags: |
|
|
- xymon-client |
|
|
- xymon-client |
|
|
- client-configuration |
|
|
- client-configuration |
|
|
when: monitoring_ip is not defined |
|
|
when: monitoring_ip is not defined |
|
|
|
|
|
|
|
|
- name: check server htpasswd name |
|
|
- name: check server htpasswd name |
|
|
fail: msg="Missing variable xymon_htname" |
|
|
fail: msg="Missing variable xymon_htname" |
|
|
tags: |
|
|
|
|
|
|
|
|
tags: |
|
|
- xymon-server |
|
|
- xymon-server |
|
|
- server-configuration |
|
|
- server-configuration |
|
|
when: xymon_htname is not defined |
|
|
when: xymon_htname is not defined |
|
|
|
|
|
|
|
|
- name: check server htpasswd password |
|
|
- name: check server htpasswd password |
|
|
fail: msg="Missing variable xymon_htpasswd" |
|
|
fail: msg="Missing variable xymon_htpasswd" |
|
|
tags: |
|
|
|
|
|
|
|
|
tags: |
|
|
- xymon-server |
|
|
- xymon-server |
|
|
- server-configuration |
|
|
- server-configuration |
|
|
when: xymon_htpasswd is not defined |
|
|
when: xymon_htpasswd is not defined |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Custom Facts |
|
|
## Custom Facts |
|
|
|
|
|
|
|
|
- name: Set Facts Debian |
|
|
- name: Set Facts Debian |
|
@ -58,12 +58,12 @@ |
|
|
client_name: "hobbit" |
|
|
client_name: "hobbit" |
|
|
client_name_cfg: "$HOBBITCLIENTHOME" |
|
|
client_name_cfg: "$HOBBITCLIENTHOME" |
|
|
client_name_logs: "$BBCLIENTLOGS" |
|
|
client_name_logs: "$BBCLIENTLOGS" |
|
|
tags: |
|
|
|
|
|
|
|
|
tags: |
|
|
- xymon-client |
|
|
- xymon-client |
|
|
- xymon-server |
|
|
- xymon-server |
|
|
- configuration |
|
|
- configuration |
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' |
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set Facts CentOs |
|
|
- name: Set Facts CentOs |
|
|
set_fact: |
|
|
set_fact: |
|
|
xymon_cfg_path: "/etc/xymon-client/client.d" |
|
|
xymon_cfg_path: "/etc/xymon-client/client.d" |
|
@ -72,15 +72,11 @@ |
|
|
client_name: "xymon" |
|
|
client_name: "xymon" |
|
|
client_name_cfg: "$XYMONCLIENTHOME" |
|
|
client_name_cfg: "$XYMONCLIENTHOME" |
|
|
client_name_logs: "$XYMONCLIENTLOGS" |
|
|
client_name_logs: "$XYMONCLIENTLOGS" |
|
|
tags: |
|
|
|
|
|
|
|
|
tags: |
|
|
- xymon-client |
|
|
- xymon-client |
|
|
- xymon-server |
|
|
- xymon-server |
|
|
- configuration |
|
|
- configuration |
|
|
when: ansible_distribution == 'CentOS' or ansible_distribution == 'CloudLinux' |
|
|
when: ansible_distribution == 'CentOS' or ansible_distribution == 'CloudLinux' |
|
|
|
|
|
|
|
|
##Main tasks |
|
|
##Main tasks |
|
|
- include: server.yml |
|
|
|
|
|
- include: client.yml |
|
|
- include: client.yml |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|