Sets up an rsync-based backup client. This role is highly opinionated, and therefore probably not fit for mass consumption.
Ansible version 2.0 or higher.
Available variables are listed below, along with their default values (see
defaults/main.yml
for more info):
dubzland_backup_client_host: "localhost"
Rsyncd host to recieve backups.
dubzland_backup_client_dirs: []
List of directories on the client machine to be backed up.
dubzland_backup_client_pre_backup_commands: []
List of commands to run prior to backing up directories. Can be used for generating database backups or putting applications into read-only mode. Use absolute paths to avoid PATH issues.
dubzland_backup_client_post_backup_commands: []
List of commands to run after backing up directories.
None
- hosts: backup-clients
become: yes
roles:
- role: dubzland-backup_client
vars:
dubzland_backup_client_host: "nas01:"
dubzland_backup_client_dirs:
- /etc
- /home
MIT