Manage `xymon` server configuration (/etc)
This commit is contained in:
parent
3c05d6bf5d
commit
532e37a474
|
@ -3,3 +3,4 @@
|
|||
|
||||
### Features
|
||||
* Install `xymon` packages for Debian based distros.
|
||||
* Manage `xymon` server configuration (/etc).
|
||||
|
|
|
@ -16,6 +16,7 @@ Manage Xymon server installation and configuration.
|
|||
|
||||
* **xymon_server__base_packages** : List of base packages in order to provide `xymon` server [default : `xymon`].
|
||||
* **xymon_server__deploy_state** : The desired state this role should achieve [default : `present`].
|
||||
* **ymon_server__etc_src** : Directory used as source to templating /etc configuration content [default : `etc/xymon`].
|
||||
|
||||
## Example Playbook
|
||||
|
||||
|
@ -31,8 +32,7 @@ Manage Xymon server installation and configuration.
|
|||
|
||||
This role will :
|
||||
* Install needed packages to provide `xymon` server.
|
||||
* Manage `xymon` server configuration and service.
|
||||
* Add 'xymon' user to new groups.
|
||||
* Manage `xymon` server configuration (/etc).
|
||||
|
||||
## Development
|
||||
|
||||
|
|
|
@ -26,6 +26,23 @@ xymon_server__base_packages:
|
|||
# TODO
|
||||
#
|
||||
xymon_server__deploy_state: 'present'
|
||||
|
||||
# ]]]
|
||||
|
||||
# ]]]
|
||||
|
||||
# Server configuration [[[
|
||||
# -----------------------------
|
||||
|
||||
# .. envvar:: xymon_server__etc_src [[[.
|
||||
# Directory with templates used to provide server configuration (usually in
|
||||
# '/etc/xymon').
|
||||
#
|
||||
# Must be a relative path to default/ directory of this role
|
||||
# or to your ansible inventory directory.
|
||||
#
|
||||
xymon_server__etc_src: '../templates/etc/xymon'
|
||||
|
||||
# ]]]
|
||||
|
||||
# ]]]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||
#
|
||||
# tasks file for ipr.ansible.xymon
|
||||
# tasks file for ipr-cnrs.xymon_server
|
||||
|
||||
# Server Manage required system packages [[[1
|
||||
- name: Ensure required packages are in there desired state
|
||||
|
@ -12,3 +12,20 @@
|
|||
with_flattened:
|
||||
- '{{ xymon_server__base_packages }}'
|
||||
|
||||
|
||||
# Server Manage /etc configuration files [[[1
|
||||
|
||||
- name: Ensure /etc directory structure exists
|
||||
file:
|
||||
path: '/etc/xymon/{{ item.path }}'
|
||||
state: directory
|
||||
with_filetree: '{{ xymon_server__etc_src }}'
|
||||
when: item.state == 'directory'
|
||||
|
||||
- name: Ensure /etc files are populated from templates
|
||||
template:
|
||||
src: '{{ item.src }}'
|
||||
dest: "/etc/xymon/{{ item.path | replace('.j2','') }}"
|
||||
with_filetree: '{{ xymon_server__etc_src }}'
|
||||
when: item.state == 'file'
|
||||
|
||||
|
|
Loading…
Reference in New Issue