Getting started
Example inventory
To configure rsnapshot on a host using the debops.rsnapshot
role, that host needs to be included in the [debops_service_rsnapshot]
Ansible inventory group:
[debops_service_rsnapshot]
hostname
By default the role will create only the configuration for its own host, but
with the no_create_root
option enabled - if the snapshot directory is not
present, the snapshots will not be created. You can either create the host
subdirectory in /var/cache/rsnapshot/hosts/
directory to enable the
snapshots, or change the configuration to point the snapshot directory to
removable media.
Example playbook
If you are using this role without DebOps, here's an example Ansible playbook
that uses the debops.rsnapshot
role:
---
- name: Manage rsnapshot service
collections: [ 'debops.debops', 'debops.roles01',
'debops.roles02', 'debops.roles03' ]
hosts: [ 'debops_service_rsnapshot' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: rsnapshot
tags: [ 'role::rsnapshot', 'skip::rsnapshot' ]
Other resources
List of other useful resources related to the debops.rsnapshot
Ansible role:
Manual pages: rsnapshot(1), rsync(1)