Install `xymon` packages for Debian based distros
This commit is contained in:
commit
3c05d6bf5d
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
language: python
|
||||||
|
python: "2.7"
|
||||||
|
|
||||||
|
# Use the new container infrastructure
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
# Install ansible
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- python-pip
|
||||||
|
|
||||||
|
install:
|
||||||
|
# Install ansible
|
||||||
|
- pip install ansible
|
||||||
|
|
||||||
|
# Check ansible version
|
||||||
|
- ansible --version
|
||||||
|
|
||||||
|
# Create ansible.cfg with correct roles_path
|
||||||
|
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||||
|
|
||||||
|
script:
|
||||||
|
# Basic role syntax check
|
||||||
|
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
## v1.0
|
||||||
|
|
||||||
|
### Features
|
||||||
|
* Install `xymon` packages for Debian based distros.
|
|
@ -0,0 +1,59 @@
|
||||||
|
# Xymon Server
|
||||||
|
|
||||||
|
1. [Overview](#overview)
|
||||||
|
2. [Role Variables](#role-variables)
|
||||||
|
3. [Example Playbook](#example-playbook)
|
||||||
|
4. [Configuration](#configuration)
|
||||||
|
5. [Development](#development)
|
||||||
|
6. [License](#license)
|
||||||
|
7. [Author Information](#author-information)
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Manage Xymon server installation and configuration.
|
||||||
|
|
||||||
|
## Role Variables
|
||||||
|
|
||||||
|
* **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`].
|
||||||
|
|
||||||
|
## Example Playbook
|
||||||
|
|
||||||
|
* Use defaults vars :
|
||||||
|
|
||||||
|
``` yml
|
||||||
|
- hosts: serverXYZ
|
||||||
|
roles:
|
||||||
|
- role: ipr-cnrs.xymon_server
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
This role will :
|
||||||
|
* Install needed packages to provide `xymon` server.
|
||||||
|
* Manage `xymon` server configuration and service.
|
||||||
|
* Add 'xymon' user to new groups.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
This source code comes from our [Gogs instance][xymon_server source] and the [Github repo][xymon_server github] exist just to be able to send the role to Ansible Galaxy…
|
||||||
|
|
||||||
|
But feel free to send issue/PR here :)
|
||||||
|
|
||||||
|
Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][xymon_server source] :)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[WTFPL][wtfpl website]
|
||||||
|
|
||||||
|
## Author Information
|
||||||
|
|
||||||
|
Jérémy Gardais
|
||||||
|
* Source : [on IPR's Gogs][xymon_server source]
|
||||||
|
* [IPR][ipr website] (Institut de Physique de Rennes)
|
||||||
|
|
||||||
|
[gogs to github hook]: https://stackoverflow.com/a/21998477
|
||||||
|
[xymon_server source]: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.xymon_server
|
||||||
|
[xymon_server github]: https://github.com/ipr-cnrs/xymon_server
|
||||||
|
[wtfpl website]: http://www.wtfpl.net/about/
|
||||||
|
[ipr website]: https://ipr.univ-rennes1.fr/
|
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||||
|
#
|
||||||
|
# ipr-cnrs.xymon_server default variables [[[
|
||||||
|
# ======================================
|
||||||
|
|
||||||
|
# Server Packages and installation [[[
|
||||||
|
# -----------------------------
|
||||||
|
|
||||||
|
# .. envvar:: xymon_server__base_packages [[[
|
||||||
|
#
|
||||||
|
# List of base packages to install.
|
||||||
|
xymon_server__base_packages:
|
||||||
|
- 'xymon'
|
||||||
|
|
||||||
|
# ]]]
|
||||||
|
# .. envvar:: xymon_server__deploy_state [[[
|
||||||
|
#
|
||||||
|
# What is the desired state which this role should achieve? Possible options:
|
||||||
|
#
|
||||||
|
# ``present``
|
||||||
|
# Default. Ensure that xymon server is installed and configured as requested.
|
||||||
|
#
|
||||||
|
# ``absent``
|
||||||
|
# Ensure that xymon server is uninstalled and it's configuration is removed.
|
||||||
|
# TODO
|
||||||
|
#
|
||||||
|
xymon_server__deploy_state: 'present'
|
||||||
|
# ]]]
|
||||||
|
|
||||||
|
# ]]]
|
|
@ -0,0 +1,15 @@
|
||||||
|
galaxy_info:
|
||||||
|
author: "Jérémy Gardais"
|
||||||
|
description: "Manage Xymon server configuration"
|
||||||
|
license: WTFPL
|
||||||
|
company: IPR
|
||||||
|
issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.xymon_server/issues
|
||||||
|
min_ansible_version: 2.4
|
||||||
|
platforms:
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- stretch
|
||||||
|
galaxy_tags:
|
||||||
|
- system
|
||||||
|
- xymon
|
||||||
|
- monitoring
|
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||||
|
#
|
||||||
|
# tasks file for ipr.ansible.xymon
|
||||||
|
|
||||||
|
# Server Manage required system packages [[[1
|
||||||
|
- name: Ensure required packages are in there desired state
|
||||||
|
package:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: '{{ "present" if (xymon_server__deploy_state == "present") else "absent" }}'
|
||||||
|
install_recommends: False
|
||||||
|
with_flattened:
|
||||||
|
- '{{ xymon_server__base_packages }}'
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
localhost
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
remote_user: root
|
||||||
|
roles:
|
||||||
|
- ipr.ansible.xymon_server
|
Loading…
Reference in New Issue