No description
- Python 69.7%
- Jinja 30.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| defaults | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| .yamllint | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
Ansible role: Barman
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
python3andpython3-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.