snapper

Ansible Role: aisbergg.snapper

This Ansible role installs and configures Snapper, a snapshot tool for Linux.

Requirements

To use Snapper, a compatible filesystem like Btrfs needs to be used on the machine.

Role Variables

Variable Default Comments
snapper_templates {} Dictionary (key-value pairs) of Snapper templates. The templates can be used, when using create-config manually. Available options for the templates can be looked up in the templates/snapper-config.j2 file.
snapper_timer_timeline_enabled true Enable/Disable the timeline timer.
snapper_timer_cleanup_enabled true Enable/Disable the cleanup timer.
snapper_timer_boot_enabled false Enable/Disable the boot timer.
snapper_configs [] List of Snapper configurations to be present on the system.
snapper_configs.path Path to the volume (e.g. Btrfs subvolume).
snapper_configs.name Name of the configuration.
snapper_configs.vars {} Dictionary (key-value pairs) of configuration variables. Available variables can be looked up in the templates/snapper-config.j2 file.
snapper_configs_absent [] List of Snapper configurations to be absent on the system.

Example Playbook

- hosts: all
  vars:
    snapper_templates:
      default:
        TIMELINE_LIMIT_HOURLY: 2
        TIMELINE_LIMIT_DAILY: 12

    snapper_configs:
      - path: /
        name: root
        vars:
          TIMELINE_LIMIT_HOURLY: 2
          TIMELINE_LIMIT_DAILY: 12
      - path: /no/timeline
        name: no-timeline
        vars:
          TIMELINE_CREATE: false
          TIMELINE_CLEANUP: false
  roles:
    - aisbergg.snapper

License

MIT

Author Information

Andre Lehmann (aisberg@posteo.de)

About

Install and configure Snapper, a snapshot tool for Linux.

Install
ansible-galaxy install aisbergg/ansible-role-snapper
GitHub repository
License
mit
Downloads
13384
Owner
DevOps, Go, Python, Bash, Ansible, Docker, GitLab-CI, Linux, MariaDB, PostgreSQL, Open Source, Communication Design, Running