ivansible.backup_base

ivansible.backup_base

This role includes common tasks to use in playbooks:

  • postgresql_db_restore_encrypted.yml: Downloads an encrypted database backup, decrypts it, and restores the database.
  • unarchive_encrypted.yml: Downloads an encrypted tar file, decrypts it, and extracts its contents.
  • install_scripts.yml: Installs the scripts gz-encrypt.sh and gz-decrypt.sh on the target machine.

Notes

The main.yml file is empty; only includes should be used.

The encryption and decryption scripts set -md for the message digest because the default has changed: openssl 1.0.x uses MD5 while 1.1+ uses SHA256. See: Fastlane Issue #9542

Requirements

None

Variables

Here are the available variables with their default values:

backup_secret: secret-123

Make sure to change this default in your inventory file.

Tags

None

Dependencies

None

Example Playbook

- hosts: vagrant-boxes
  tasks:

  - include_role:
      name: ivansible.backup_base
      tasks_from: postgresql_db_restore_encrypted.yml
    vars:
      backup_url: https://backups.example.com/database.pgdump.gz.aes
      #backup_secret: some-secret
      db_name: mydata
      login_host: postgres.example.com
      #db_port: 5432
      login_password: postgres-password

  - include_role:
      name: ivansible.backup_base
      tasks_from: unarchive_encrypted.yml
    vars:
      backup_url: https://backups.example.com/archive.tar.gz.aes
      #backup_secret: some-secret
      dest: /path/to/files
      owner: username
      mode: 0644
      creates: /path/to/files/some-file.txt

  - import_role:
      name: ivansible.backup_base
      tasks_from: install_scripts.yml

License

MIT

Author Information

Created by IvanSible from 2018-2020.

Informazioni sul progetto

included tasks to backup and restore files and databases

Installa
ansible-galaxy install ivansible.backup_base
Licenza
Unknown
Download
605
Proprietario
ivandeex ansible roles, molecule tests: https://galaxy.ansible.com/ivansible/