grofers.barman

grofers.ansible-role-barman ビルドステータス

💥 Grofersでテスト済み

このAnsibleロールは、Debianベースのディストリビューションに対して barman by 2ndQuadrantをインストールして構成します (Ubuntu 14.04でテスト済みですが、他のディストリビューションでも動作するはずです)。

インストール方法

Ansible 2.1.0以上でテスト済みです。 インストールするには:

ansible-galaxy install grofers.barman

ロール変数

バックアップ用のサーバーリストを定義します:

barman_server_configuration:

サーバーの設定:

予約されたサーバーの名前

  - name: ssh
description: "SSH経由のPostgreSQLデータベースの例"
conninfo: "host=pg user=barman dbname=postgres"

バックアップ方法を定義します(rsync|postgres)

backup_method: "rsync"

rsyncメソッドの場合:

ssh_command: "ssh postgres@pg"
# ansible-role-barmanのデフォルトファイル
barman_client_only: no

## 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"
# PGDGリポジトリのピン優先度
barman_postgresql_apt_pin_priority: 500

## Cron設定
barman_cron_disabled: false
# barman cronを毎分実行
barman_cron_schedule:
  minute: "*"
  hour: "*"
  day: "*"
  weekday: "*"
  month: "*"

## 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: "SSH経由のPostgreSQLデータベースの例"
    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: "*"

オプションの変数がたくさんありますので、すべてについてはdefaults/main.ymlをご覧ください。

サンプルプレイブック

    - name: barmanのセットアップと構成
      become: yes
      roles:
        - grofers.barman

ライセンス

MIT

作者情報

vishesh92

プロジェクトについて

Ansible role which installs and configures barman by 2ndQuadrant

インストール
ansible-galaxy install grofers.barman
ライセンス
mit
ダウンロード
1.7k
所有者