No description
  • Python 69.7%
  • Jinja 30.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adrien Waksberg c8d3e8f1bc
All checks were successful
/ lint (push) Successful in 9s
/ molecule (push) Successful in 2m38s
first version
2026-08-24 23:00:12 +02:00
.forgejo/workflows first version 2026-08-24 23:00:12 +02:00
defaults first version 2026-08-24 23:00:12 +02:00
meta first version 2026-08-24 23:00:12 +02:00
molecule/default first version 2026-08-24 23:00:12 +02:00
tasks first version 2026-08-24 23:00:12 +02:00
templates first version 2026-08-24 23:00:12 +02:00
.gitignore first version 2026-08-24 23:00:12 +02:00
.yamllint first version 2026-08-24 23:00:12 +02:00
CHANGELOG.md first version 2026-08-24 23:00:12 +02:00
LICENSE first version 2026-08-24 23:00:12 +02:00
README.md first version 2026-08-24 23:00:12 +02:00

Ansible role: Barman

Version License Build

Install and configure Barman

Requirements

  • Ansible >= 2.21
  • Debian
    • Trixie

Role variables

Name Type Required Default Comment
barman_postgresql_versions array no [18] the major postgresql version to use
barman_config dict no the general configuration
barman_backups dict no backup configuration
barman_ssh_key str no the private ssh key for barman user
barman_authorized_key array no list the ssh public key allowed to connect barman
barman_cron array no set the cron for barman backup

barman_config

See all options on barman documentation

Example:

barman_user: barman
barman_home: /var/lib/barman
log_file: /var/log/barman/barman.log
log_level: INFO

barman_backups

Name Type Required Default Comment
key str yes the backup name

See all options on barman documentation

Example:

pgtest:
  conninfo: host=localhost user=barman dbname=postgres password=secret
  streaming_conninfo: host=localhost user=barman dbname=postgres password=secret
  slot_name: barman
  backup_method: postgres
  streaming_archiver: 'on'
  backup_options: concurrent_backup

How to use

- hosts: server
  roles:
    - barman
  vars:
    barman_backups:
      pgtest:
        conninfo: host=localhost user=barman dbname=postgres password=secret
        streaming_conninfo: host=localhost user=barman dbname=postgres password=secret
        slot_name: barman
        backup_method: postgres
        streaming_archiver: 'on'
        backup_options: concurrent_backup

Development

Test with molecule and docker

  • install docker
  • install python3 and python3-pip
  • install molecule and dependencies pip3 install molecule molecule-docker docker ansible-lint testinfra yamllint
  • run molecule test

License

Copyright (c) 2026 Adrien Waksberg

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.