leadlineit.bareos_fd
安装和配置 Bareos-FD (版本 22) 的 Ansible Galaxy 角色
这个角色帮助安装和配置 Bareos-FD (版本 22)。
支持的操作系统
- Debian 12 (bookworm)
- Debian 11 (bullseye)
- Debian 10 (buster)
- RHEL 9 (CentOS Stream 9)
- RHEL 8 (CentOS Stream 8)
- RHEL 7 (CentOS 7)
要求
这个角色需要 Ansible 2.11 或更高版本。
角色变量
可以传递到这个角色的变量及其简要说明如下:
---
bareos_tls_path: /etc/bareos/tls
bareos_tls_certs: your.bareos.dir.com
bareos_fd:
director:
- name: your-dir
description: 允许联系此文件守护进程的主管。
password: DIRAver@gEStr0ngPaSSw0rd
tls_enable: "yes"
- name: your-mon
description: 受限制的主管监视描述
password: MONAver@gEStr0ngPaSSw0rd
monitor: "yes"
tls_enable: "yes"
client:
- name: your-client
description: 你的 Bareos 客户端
fdport: 9102
max_jobs: 20
tls_enable: "yes"
messages:
- name: your-messages
description: 消息描述
server: your-dir
上面的变量是可选的。它们没有默认值,所以如果你不定义它们,使用这些变量的任务将被跳过。
你可以只设置其中的一些变量,或者根本不设置(在这种情况下,将简单地以默认配置安装 Bareos-FD)。
你可以通过以下方式安装和调整 MySQL 数据备份的 Percona XtraBackup:
---
percona_xtrabackup: "yes"
Percona XtraBackup 的版本将取决于你的 MySQL 服务器('mysql-community-server')版本。
只有在你主机上安装了 'mysql-community-server' 时才说“是”。
另外,你可以使用 HashiCorp Vault 来存储客户端证书(当你使用 Bareos 和 TLS 时)。
这个变量也是可选的:
---
hashicorp_vault:
address: your.vault.com
token: your_token
path: your-path-to-certs
clients:
- name: host1.client1
client: client1
role: role1
ttl: 24h
- name: host2.client1
client: client1
role: role1
ttl: 18h
- name: host01.client2
client: client2
role: client2
ttl: 12h
- name: host02.client2
client: client2
role: client2
ttl: 96h
另一项你可以做的事情是远程添加客户端配置到你的主 Bareos 主管服务器。
这个变量也是可选的:
---
bareos_server: you.bareos.dir.server
bareos_dir:
client:
- name: your-client
description: 你的客户端配置
address: 10.0.0.1
fdport: 9102
max_jobs: 20
passive: "yes"
tls_enable: "yes"
jobs:
- name: client-job1
description: 客户端的任务1
client: client.name.com
jobdef: your-jobdefs1
- name: client-job2
description: 客户端的任务2
pool: your-pool
fileset: "your-fileset"
schedule: "your-schedule"
依赖关系
无。
示例剧本
为用户提供一个示例如何使用你的角色(例如,以参数传递变量)也是很好的:
- hosts: servers
roles:
- { role: leadlineit.bareos_fd, tags: bareos_fd }
许可证
MIT
作者信息
这个角色由 Artem Kasianchuk 创建。