grofers.barman

grofers.ansible-role-barman Build-Status

💥 Erprobt bei Grofers

Ansible-Rolle, die barman von 2ndQuadrant auf debianbasierten Distributionen installiert und konfiguriert (Getestet mit Ubuntu 14.04, sollte aber auch bei anderen Distributionen funktionieren).

Installation

Dies wurde mit Ansible 2.1.0 und höher getestet. Um zu installieren:

ansible-galaxy install grofers.barman

Rollenvariablen

Definition der Serverliste für Sicherung:

barman_server_configuration:

Einstellungen für den Server:

Name des reservierten Servers

  - name: ssh
description: "Beispiel einer PostgreSQL-Datenbank (über SSH)"
conninfo: "host=pg user=barman dbname=postgres"

Backup-Methode definieren (rsync|postgres)

backup_method: "rsync"

Wenn die Methode rsync

ssh_command: "ssh postgres@pg"
# Standarddatei für ansible-role-barman
barman_client_only: no

## APT-Einstellungen
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"
# Pin-Priorität des PGDG-Repositories
barman_postgresql_apt_pin_priority: 500

## Cron-Konfiguration
barman_cron_disabled: false
# Barman-Cron jede Minute ausführen
barman_cron_schedule:
  minute: "*"
  hour: "*"
  day: "*"
  weekday: "*"
  month: "*"

## Barman-Konfiguration
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: "Beispiel einer PostgreSQL-Datenbank (über 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: "*"

Es gibt noch viele weitere optionale Variablen, siehe defaults/main.yml für alle.

Beispiel-Playbook

    - name: Barman einrichten und konfigurieren
      become: yes
      roles:
        - grofers.barman

Lizenz

MIT

Autoreninformation

vishesh92

Über das Projekt

Ansible role which installs and configures barman by 2ndQuadrant

Installieren
ansible-galaxy install grofers.barman
Lizenz
mit
Downloads
1.7k
Besitzer