Manage `xymon-client` default configuration file.

This commit is contained in:
Jeremy Gardais 2017-08-11 14:33:31 +02:00
parent 6ef35930c7
commit b8799a13e8
5 changed files with 50 additions and 1 deletions

View File

@ -3,4 +3,5 @@
### Features
* Install `xymon-client` packages for Debian based distros.
* Manage `xymon-client` default configuration file.
* Manage `xymon-client` service.

View File

@ -17,6 +17,8 @@ Manage Xymon (client) installation and configuration.
* **xymon_cli_manage**: If `xymon-client` should be managed with this role [default: `true`].
* **xymon_cli_pkg_state**: State of new `xymon-client` package(s) [default: `installed`].
* **xymon_cli_default_conf_path**: Configuration file for `xymon-client` [default: `/etc/default/xymon-client`].
* **xymon_cli_default_conf_tpl**: Template used to generate the previous config file [default: `etc/default/xymon-client.j2`].
* **xymon_cli_service_manage**: If `xymon-client` service should be managed with this role [default: `true`].
* **xymon_cli_service_name**: `xymon-client` service name [default: `xymon-client`].
* **xymon_cli_service_enabled**: Set `xymon-client` service available at startup [default: `true`].
@ -41,7 +43,7 @@ Please see default value by Operating System file in [vars][vars directory] dire
This role will:
* Install needed packages to provide `xymon-client`.
* Manage `xymon-client` service.
* Manage `xymon-client` configuration and service.
## Development

View File

@ -6,6 +6,10 @@
xymon_cli_manage: true
xymon_cli_pkg_state: 'installed'
## conf
xymon_cli_default_conf_path: '/etc/default/xymon-client'
xymon_cli_default_conf_tpl: 'etc/default/xymon-client.j2'
## service
xymon_cli_service_manage: true
xymon_cli_service_name: 'xymon-client'

View File

@ -17,6 +17,16 @@
- '{{ xymon_cli_pkg_list }}'
when: xymon_cli_manage
- name: CONFIG xymon-client
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
## service
- name: SERVICE manage '{{ xymon_cli_service_name }}'
service:

View File

@ -0,0 +1,32 @@
# Configure the Xymon client settings.
# You MUST set the list of Xymon servers that this
# client reports to.
# It is good to use IP-addresses here instead of DNS
# names - DNS might not work if there's a problem.
#
# E.g. (a single Xymon server)
# XYMONSERVERS="192.168.1.1"
# or (multiple servers)
# XYMONSERVERS="10.0.0.1 192.168.1.1"
XYMONSERVERS="127.0.0.1"
# The defaults usually suffice for the rest of this file,
# but you can tweak the hostname that the client reports
# data with, and the OS name used (typically needed only on
# RHEL or RHAS servers).
# CLIENTHOSTNAME=""
# CLIENTOS="rhel3"
CLIENTHOSTNAME="hostname.domain.local"
# Optionally mount a tmpfs on /var/lib/xymon/tmp. On client systems this has
# the advantage that client reports will continue to work even if the /var
# filesystem is out of space. This setting is ignored on server systems where
# this directory contains important information that must be preserved over
# reboots (xymond.chk).
#TMPFSSIZE="5000000"