2017-08-11 13:58:39 +02:00
|
|
|
---
|
|
|
|
# tasks file for ipr.ansible.xymon
|
|
|
|
|
|
|
|
- name: Load specific OS vars for xymon
|
|
|
|
include_vars: "{{ item }}"
|
|
|
|
with_first_found:
|
|
|
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml"
|
|
|
|
- "{{ ansible_distribution|lower }}.yml"
|
|
|
|
- "{{ ansible_os_family|lower }}.yml"
|
|
|
|
|
|
|
|
# client {{{
|
|
|
|
- name: client package
|
|
|
|
package:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: '{{ xymon_cli_pkg_state }}'
|
|
|
|
with_items:
|
|
|
|
- '{{ xymon_cli_pkg_list }}'
|
|
|
|
when: xymon_cli_manage
|
|
|
|
|
2017-09-04 16:15:42 +02:00
|
|
|
- name: CONFIG xymon-client service
|
2017-08-11 14:33:31 +02:00
|
|
|
template:
|
|
|
|
src: '{{ xymon_cli_default_conf_tpl }}'
|
|
|
|
dest: '{{ xymon_cli_default_conf_path }}'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
backup: true
|
|
|
|
when: xymon_cli_manage
|
2017-08-11 14:42:49 +02:00
|
|
|
notify: restart xymon-client service
|
2017-08-11 14:33:31 +02:00
|
|
|
|
2017-09-04 16:15:42 +02:00
|
|
|
- name: CONFIG xymon user's groups
|
|
|
|
user:
|
|
|
|
name: xymon
|
|
|
|
groups: '{{ xymon_user_groups }}'
|
|
|
|
notify: restart xymon-client service
|
|
|
|
|
2017-08-11 14:14:51 +02:00
|
|
|
## service
|
|
|
|
- name: SERVICE manage '{{ xymon_cli_service_name }}'
|
|
|
|
service:
|
|
|
|
name: '{{ xymon_cli_service_name }}'
|
|
|
|
state: started
|
|
|
|
enabled: '{{ xymon_cli_service_enabled }}'
|
|
|
|
when: xymon_cli_service_manage
|
2017-08-11 13:58:39 +02:00
|
|
|
# }}}
|
2017-09-04 17:24:40 +02:00
|
|
|
|
|
|
|
# plugins {{{
|
2018-02-08 16:02:55 +01:00
|
|
|
- name: PLUGIN mq packages
|
|
|
|
package:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: '{{ "present" if xymon_plug_mq_state else "absent" }}'
|
|
|
|
with_items:
|
|
|
|
- '{{ xymon_plug_mq_package }}'
|
|
|
|
when: xymon_plug_manage
|
|
|
|
notify: restart xymon-client service
|
|
|
|
|
2017-09-04 17:24:40 +02:00
|
|
|
- name: PLUGIN mq
|
|
|
|
template:
|
|
|
|
src: '{{ xymon_plug_mq_tpl }}'
|
|
|
|
dest: '{{ xymon_plug_mq_path }}'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
when: xymon_plug_manage
|
|
|
|
notify: restart xymon-client service
|
2017-09-04 17:42:53 +02:00
|
|
|
|
2018-02-08 16:07:22 +01:00
|
|
|
- name: PLUGIN libs packages
|
|
|
|
package:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: '{{ "present" if xymon_plug_libs_state else "absent" }}'
|
|
|
|
with_items:
|
|
|
|
- '{{ xymon_plug_libs_package }}'
|
|
|
|
when: xymon_plug_manage
|
|
|
|
notify: restart xymon-client service
|
|
|
|
|
2017-09-04 17:42:53 +02:00
|
|
|
- name: PLUGIN libs
|
|
|
|
template:
|
|
|
|
src: '{{ xymon_plug_libs_tpl }}'
|
|
|
|
dest: '{{ xymon_plug_libs_path }}'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
when: xymon_plug_manage
|
|
|
|
notify: restart xymon-client service
|
2018-02-08 17:28:49 +01:00
|
|
|
|
|
|
|
- name: PLUGIN libs whitelist
|
|
|
|
template:
|
|
|
|
src: 'etc/xymon/libs.local.yaml.j2'
|
|
|
|
dest: '/etc/xymon/libs.local.yaml'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
when: xymon_plug_manage
|
|
|
|
notify: restart xymon-client service
|
|
|
|
|
2017-09-04 17:24:40 +02:00
|
|
|
# }}}
|