jsecchiero.pmm_client
pmm_client
此角色用于安装和配置 Percona PMM 客户端。
要求
此角色需要 Ansible 2.5.0 或更高版本。
您可以简单地使用 pip 安装(并定义)一个稳定版本:
pip install ansible==2.6.4
所有平台要求都列在元数据文件中。
安装
ansible-galaxy install timorunge.pmm_client
角色变量
可以传递给此角色的变量及其简要描述如下。 (有关所有变量,请查看 defaults/main.yml)
# 定义版本
# 类型:整型
pmm_client_version: 1.14.1
# pmm-server 的 IP 地址和端口:
# 类型:字符串
pmm_client_server_host: 172.20.0.10
# 类型:整型
pmm_client_server_port: 443
# 禁用基本认证:
# 类型:布尔值
pmm_client_server_basic_auth: False
# 启用 SSL:
# 类型:布尔值
pmm_client_server_use_ssl: True
# 定义要添加或移除的服务:
# 类型:列表
pmm_client_add_services:
- linux:metrics
- mysql:metrics
- mongodb:metrics
pmm_client_remove_services:
- mysql:queries
# 定义要启动或停止的服务:
# 类型:列表
pmm_client_start_services:
- linux:metrics
- mysql:metrics
- mongodb:metrics
pmm_client_stop_services:
- mysql:queries
# 定义 MySQL 数据库连接的凭证:
# 类型:字典
pmm_client_db:
mysql:
host: localhost
port: 3306
username: root
password: toor
示例
1) 安装不使用基本认证且禁用 SSL 的 PMM 客户端
- hosts: all
become: yes
vars:
pmm_client_server_host: 172.20.0.10
pmm_client_server_port: 443
pmm_client_server_basic_auth: False
pmm_client_server_use_ssl: False
pmm_client_add_services:
- linux:metrics
pmm_client_start_services:
- linux:metrics
roles:
- timorunge.pmm_client
2) 安装使用基本认证且启用 SSL 的 PMM 客户端
- hosts: all
become: yes
vars:
pmm_client_server_host: 172.20.0.10
pmm_client_server_port: 443
pmm_client_server_basic_auth: True
pmm_client_server_basic_auth_username: admin
pmm_client_server_basic_auth_password: mySecurePassword
pmm_client_server_use_ssl: True
pmm_client_add_services:
- linux:metrics
pmm_client_start_services:
- linux:metrics
roles:
- timorunge.pmm_client
3) 从定义的 URL 安装 PMM 客户端
- hosts: all
become: yes
vars:
pmm_client_version: 1.11.0
pmm_client_version_revision: 1
pmm_client_use_official_repo: False
pmm_client_debian_pkg: "https://www.percona.com/downloads/pmm/{{ pmm_client_version }}/binary/debian/{{ ansible_distribution_release }}/x86_64/pmm-client_{{ pmm_client_version }}-{{ pmm_client_version_revision }}.{{ ansible_distribution_release }}_amd64.deb"
roles:
- timorunge.pmm_client
4) 卸载 PMM 客户端
- hosts: all
become: yes
vars:
pmm_client_enabled: False
roles:
- timorunge.pmm_client
测试
Travis 测试使用 Docker 和 docker_test_runner。Travis 上的测试执行语法检查。
依赖关系
无
许可证
BSD
作者信息
- 基于 Chris Sam 的 Ansible 角色
- 进行了大量修改:Timo Runge
关于项目
Percona PMM Client for Debian and RedHat based distributions
安装
ansible-galaxy install jsecchiero.pmm_client
许可证
Unknown
下载
1.7k
拥有者
10x lazineer