guillaumewatteeux.centreon
Centreon
Ansible Centreon 角色。
功能:
- 创建 / 管理 Centreon 实例上的主机
- 使用已创建的 hostTemplate 部署服务
- 发现:
- 从挂载点部署服务
- 为网络接口部署服务
需求
centreonapi
pip install https://github.com/guillaumewatteeux/centreon-sdk-python/releases/download/v0.0.2/centreonapi-0.0.2.tar.gz
角色变量
请参见 defaults/main.yml
示例剧本
- hosts: all
roles:
- role: guillaumewatteeux.centreon
centreon_hostgroups:
- name: "MyProject"
alias: "我的第一个项目"
- name: "_dev"
alias: "开发"
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"
自动创建 "MyProject" 和 "dev" 的主机组。创建新主机并链接到主机组。
monitoring_ip
:定义主机的替代 IP(例如:VPN IP)
许可证
Apache 2.0