mimacom.lvs-snapshot

Ansible Role: lvs-snapshot

Build Status

This Ansible role sets up a cron job that automatically takes a snapshot of a Logical Volume (using Logical Volume Manager). During the snapshot process, all running Docker containers will be paused.

Requirements

Make sure you have LVM and Docker installed on your system. This role does not install these for you (yet).

Role Variables

Here are the available variables along with their default values (check defaults/main.yml):

  • lvssnap_creation_time: []

    • Set the time (in hour and minute) to take the snapshot.
  • lvssnap_deletion_time: []

    • Set the time (in hour and minute) to delete the snapshot.
  • lvssnap_lv_device: ""

    • Specify the path to the Logical Volume (LV) that you want to snapshot.
  • lvssnap_snapshot_device: ""

    • Specify the path for the new snapshot LV to create.
  • lvssnap_snapshot_mountpoint: ""

    • Specify the path to mount the snapshot.

Dependencies

There are no dependencies.

Example Playbook

- hosts: servers
  become: yes
  vars:
    lvssnap_creation_time:
      hour: 21
      minute: 50
    lvssnap_deletion_time:
      hour: 4
      minute: 0
    lvssnap_lv_device: /dev/data/docker
    lvssnap_snapshot_device: /dev/data/docker_snap
    lvssnap_snapshot_mountpoint: /media/docker_snap
  roles:
    - role: mimacom.lvs-snapshot

License

This role is licensed under the Apache License 2.0.

Author Information

This role was created by Remo Wenger from mimacom ag.

Informazioni sul progetto

Installs cronjob which creates LVM snapshots on running Docker containers.

Installa
ansible-galaxy install mimacom.lvs-snapshot
Licenza
Unknown
Download
1.6k
Proprietario
Leading provider of open source, cloud and data software.