Git Product home page Git Product logo

ansible-role-autorestic's Introduction

Ansible Role: dbrennand.autorestic

Gitpod ready-to-code Ansible-Lint Molecule Ansible-Release

Ansible role to configure backups using autorestic.

Requirements

None.

Assumptions

This role places the autorestic and restic binaries into /opt/autorestic/bin and /opt/restic/bin respectively. Symbolic links are created to /usr/local/bin.

Role Variables

autorestic_architecture: mips

Overrides ansible_architecture in case you have some exotic combination. See dependencies for further details.

autorestic_version: 1.7.7
autorestic_restic_version: 0.15.1

The version of autorestic and restic to install.

autorestic_install_directory:
  path: /opt/autorestic/bin
  # Optional
  # owner: owner
  # group: group
  # mode: 0700
autorestic_restic_install_directory:
  path: /opt/restic/bin
  # ...

The directories to install the autorestic and restic binaries at.

autorestic_config: |-
  version: 2
  locations:
    home:
      from: /home/me
      to: remote
      # Every Monday
      cron: "0 0 * * MON"

  backends:
    remote:
      type: b2
      path: 'myBucket:backup/home'
      env:
        B2_ACCOUNT_ID: ID
        B2_ACCOUNT_KEY: Key

The autorestic YAML configuration to be placed into the ~/.autorestic.yml file. See the autorestic documentation for details on the YAML configuration.

autorestic_info: false

Whether or not to run autorestic info to validate that the autorestic YAML configuration is valid.

autorestic_check: false

Whether or not to run autorestic check to make sure backends are configured properly and initialises them if they are not already.

autorestic_cron: false
autorestic_cron_verbose: false

Whether or not to create an autorestic crontab entry to trigger automated backups. Use autorestic_cron_verbose to enable verbose logging. Autorestic locations need to be configured with cron.

autorestic_state: present

Whether or not to remove autorestic, restic, configuration and crontab entry. Set to absent for removal.

This will not affect any backends and their data.

Dependencies

This role depends on precompiled binaries published on GitHub:

When using autorestic_architecture, refer to the release assets for supported binary architectures.

Example Playbook

- hosts: all
  roles:
    - dbrennand.autorestic

Molecule Tests 🧪

To test the role, use Molecule: molecule test

License

This project is licensed under the MIT License - see the LICENSE for details.

Authors & Contributors

dbrennand - Author

whysthatso - Contributor

PleaseStopAsking - Contributor

ansible-role-autorestic's People

Contributors

dbrennand avatar whysthatso avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.