grofers.barman

grofers.ansible-role-barman Statut de construction

💥 Testé en situation réelle chez Grofers

Rôle Ansible qui installe et configure barman par 2ndQuadrant uniquement sur des distributions basées sur Debian (Testé uniquement avec Ubuntu 14.04, mais devrait fonctionner avec d'autres distributions également).

Installation

Cela a été testé sur Ansible 2.1.0 et supérieur. Pour installer :

ansible-galaxy install grofers.barman

Variables du rĂ´le

Définir la liste des serveurs pour la sauvegarde :

barman_server_configuration:

Paramètres pour le serveur :

nom du serveur réservé

  - name: ssh
description: "Exemple de base de données PostgreSQL (via SSH)"
conninfo: "host=pg user=barman dbname=postgres"

Définir la méthode de sauvegarde (rsync|postgres)

backup_method: "rsync"

Si la méthode est rsync

ssh_command: "ssh postgres@pg"
# fichier de paramètres par défaut pour ansible-role-barman
barman_client_only: no

## Paramètres 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"
# Priorité de pinning du dépôt PGDG
barman_postgresql_apt_pin_priority: 500

## Configuration Cron
barman_cron_disabled: false
# Exécuter le cron barman chaque minute
barman_cron_schedule:
  minute: "*"
  hour: "*"
  day: "*"
  weekday: "*"
  month: "*"

## Configuration de 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: "Exemple de base de données PostgreSQL (via 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: "*"

Il existe beaucoup plus de variables optionnelles, veuillez consulter defaults/main.yml pour toutes les trouver.

Exemple de Playbook

    - name: Configurer et mettre en place barman
      become: yes
      roles:
        - grofers.barman

Licence

MIT

Informations sur l'auteur

vishesh92

Ă€ propos du projet

Ansible role which installs and configures barman by 2ndQuadrant

Installer
ansible-galaxy install grofers.barman
Licence
mit
Téléchargements
1.7k
Propriétaire