Skip to content

Commit

Permalink
Update README information
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumewatteeux committed Feb 10, 2019
1 parent 19dc8f8 commit 9684130
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 12 deletions.
57 changes: 45 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,49 @@
## Ansible Centreon Module ##
# Ansible Centreon Module #

IN DEVELOPMENT !!! Use as ours risks
An Ansible module to configure Centreon

### Install ###
* HostGroup Management (add/del)
* Host Management (add, del, hosttemplate, hostgroup, macros, params, status)
* In development...

Install required centreonapi (> 0.0.2) python library
## Requirements ##

Copy `library/centreon_*.py` on your Ansible `library` path
* Ansible >= 2.4.0 (ansible)
* centreonapi >= 0.1.3

###Install ##

### Use It ! ###
### Install CentreonAPI

```shell
pip install centreonapi>=0.1.3
```

### Install Ansible-modules-centreon

```shell
$ cd YourPlayBookProject
$ cat >> galaxy_requirements.yml
- src: https://github.com/guillaumewatteeux/ansible-centreon.git
scm: git
version: dev
name: ansible-modules-centreon

CTRL+D

$ ansible-galaxy install -r galaxy_requirements.yml
```

## Use It ! ##

Playbook example

```yaml
- hosts: localhost
- hosts: server
connection: local
roles:
- role: ansible-modules-centreon

vars:
centreon_url: "http://192.168.189.128/centreon"
centreon_api_user: "admin"
Expand All @@ -28,7 +57,6 @@ Playbook example
password: "{{ centreon_api_pass }}"
listen: "centreon api applycfg"


tasks:
- name: Add Hostgroup
centreon_hostgroup:
Expand Down Expand Up @@ -57,7 +85,7 @@ Playbook example
- OS-Linux-SNMP-disk
hostgroups:
- Linux-Servers
- Production-Servers
- ProjectA
instance: Central
status: enabled
state: present
Expand All @@ -74,13 +102,18 @@ Playbook example
value: value2
desc: macro description
applycfg: False
delegate_to: localhost
notify: "centreon api applycfg"

```

### Default values ###
/!\ Warning about `params`: ansible module not idempotency with this options

## Default values ##

* `instance` : Central
* `status`: enabled
* `state`: present
* `state`: present

## AUTHOR INFORMATION

Guillaume Watteeux ([@guillaumewatteeux]https://github.com/guillaumewatteeux)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
centreonapi>=0.1.3

0 comments on commit 9684130

Please sign in to comment.