grofers.barman
grofers.ansible-role-barman 
💥 Testowane w Grofers
Rola Ansible, która instaluje i konfiguruje barman od 2ndQuadrant tylko na dystrybucjach opartych na debianie (Przetestowane tylko na Ubuntu 14.04, ale powinno działać z innymi dystrybucjami).
Instalacja
To zostało przetestowane na Ansible 2.1.0 i wyższych. Aby zainstalować:
ansible-galaxy install grofers.barman
Zmienne roli
Definiowanie listy serwerów do backupu:
barman_server_configuration:
Ustawienia dla serwera:
nazwa zarezerwowanego serwera
- name: ssh
description: "Przykład bazy danych PostgreSQL (przez SSH)"
conninfo: "host=pg user=barman dbname=postgres"
Zdefiniuj metodę backupu (rsync|postgres)
backup_method: "rsync"
Jeśli metoda to rsync
ssh_command: "ssh postgres@pg"
# domyślny plik dla ansible-role-barman
barman_client_only: no
## Ustawienia APT
barman_postgresql_apt_key_id: ACCC4CF8
barman_postgresql_apt_key_url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
barman_postgresql_apt_repository: "deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main"
# Priorytet PIN dla repozytorium PGDG
barman_postgresql_apt_pin_priority: 500
## Konfiguracja Cron
barman_cron_disabled: false
# Uruchom cron barman co minutę
barman_cron_schedule:
minute: "*"
hour: "*"
day: "*"
weekday: "*"
month: "*"
## Konfiguracja Barman
barman_user: "barman"
barman_configuration_files_directory: "/etc/barman.d"
barman_home: "/var/lib/barman"
barman_log_directory: "/var/log/barman"
barman_log_file: "{{ barman_log_directory }}/barman.log"
barman_log_level: "INFO"
barman_server_configuration:
- name: ssh
description: "Przykład bazy danych PostgreSQL (przez SSH)"
ssh_command: "ssh postgres@pg"
conninfo: "host=pg user=barman dbname=postgres"
backup_method: "rsync"
reuse_backup: "None"
backup_options: "exclusive_backup"
archiver: "on"
archiver_batch_size: 50
path_prefix: ''
cron_disabled: false
cron_schedule:
minute: "0"
hour: "0"
day: "*"
month: "*"
weekday: "*"
Jest jeszcze wiele opcjonalnych zmiennych, zobacz plik defaults/main.yml, aby zobaczyć wszystkie z nich.
Przykładowy playbook
- name: Ustaw i skonfiguruj barman
become: yes
roles:
- grofers.barman
Licencja
Informacje o autorze
O projekcie
Ansible role which installs and configures barman by 2ndQuadrant
Zainstaluj
ansible-galaxy install grofers.barman
Licencja
mit
Pobrania
1.7k
Właściciel