guillaumewatteeux.centreon

Centreon

Ansible Centreon role.

Features:

  • Create and manage hosts on a Centreon instance
  • Deploy services using host templates created earlier
  • Discovery:
    • Deploy services from a mount point
    • Deploy services for network interfaces

Requirements

To use this role, install centreonapi with the following command:

pip install https://github.com/guillaumewatteeux/centreon-sdk-python/releases/download/v0.0.2/centreonapi-0.0.2.tar.gz

Role Variables

Check the defaults/main.yml file for available variables.

Example Playbook

Here's an example of how to use the role:

- hosts: all
  roles:
    - role: guillaumewatteeux.centreon
      centreon_hostgroups:
        - name: "MyProject"
          alias: "My First Project"
        - name: "_dev"
          alias: "dev"
      centreon_host_hostgroups:
        - "MyProject"
        - "_dev"
      tags:
        - centreon

- hosts: mysql_servers
  roles:
    - role: guillaumewatteeux.centreon
      centreon_host_hosttemplates: App-DB-MySQL-custom
      centreon_host_macros:
        - name: "MYSQLPASSWORD"
          value: "{{ vault_sql_users_passwords[ansible_fqdn]['centreon'] }}"
        - name: "MYSQLPORT"
          value: 3306
        - name: "MYSQLUSERNAME"
          value: "centreon"

This playbook automatically creates host groups for "MyProject" and "dev", creates new hosts, and links them to the corresponding host groups.

monitoring_ip: Use this to define an alternative IP for the host (e.g., a VPN IP).

License

Apache 2.0

Informazioni sul progetto

Deploy host to Centreon

Installa
ansible-galaxy install guillaumewatteeux.centreon
Licenza
apache-2.0
Download
3.1k
Proprietario