{"id":19402346,"url":"https://github.com/robertdebock/ansible-role-vault_snapshot","last_synced_at":"2026-01-23T04:58:16.169Z","repository":{"id":66973412,"uuid":"603330513","full_name":"robertdebock/ansible-role-vault_snapshot","owner":"robertdebock","description":"Configure vault_snapshot on Vault.","archived":false,"fork":false,"pushed_at":"2025-11-03T05:44:36.000Z","size":92,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-03T07:17:46.295Z","etag":null,"topics":["ansible","molecule","playbook","security","snapshot","tox","vaultsnapshot"],"latest_commit_sha":null,"homepage":"https://robertdebock.nl/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertdebock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"robertdebock"}},"created_at":"2023-02-18T07:12:03.000Z","updated_at":"2025-11-03T05:44:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b2b8063-f72e-4056-b30c-f7be7e73c35d","html_url":"https://github.com/robertdebock/ansible-role-vault_snapshot","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/robertdebock/ansible-role-vault_snapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-vault_snapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-vault_snapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-vault_snapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-vault_snapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdebock","download_url":"https://codeload.github.com/robertdebock/ansible-role-vault_snapshot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-vault_snapshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","molecule","playbook","security","snapshot","tox","vaultsnapshot"],"created_at":"2024-11-10T11:23:12.251Z","updated_at":"2026-01-23T04:58:16.160Z","avatar_url":"https://github.com/robertdebock.png","language":null,"funding_links":["https://github.com/sponsors/robertdebock"],"categories":[],"sub_categories":[],"readme":"# [Ansible role vault_snapshot](#ansible-role-vault_snapshot)\n\nConfigure vault_snapshot on Vault.\n\n|GitHub|GitLab|Downloads|Version|\n|------|------|---------|-------|\n|[![github](https://github.com/robertdebock/ansible-role-vault_snapshot/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-vault_snapshot/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-vault_snapshot/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-vault_snapshot)|[![downloads](https://img.shields.io/ansible/role/d/robertdebock/vault_snapshot)](https://galaxy.ansible.com/robertdebock/vault_snapshot)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-vault_snapshot.svg)](https://github.com/robertdebock/ansible-role-vault_snapshot/releases/)|\n\n## [Example Playbook](#example-playbook)\n\nThis example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-vault_snapshot/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.\n\n```yaml\n---\n- name: Converge\n  hosts: all\n  become: true\n  gather_facts: true\n\n  pre_tasks:\n    - name: Read token from remote machine\n      ansible.builtin.slurp:\n        src: /root/.vault-token\n      register: token_raw\n\n  roles:\n    - role: robertdebock.vault_snapshot\n      vault_snapshot_token: \"{{ token_raw['content'] | b64decode }}\"\n      vault_snapshot_ssl_verify: false\n      vault_snapshot_schedules:\n        - name: hourly\n          interval_seconds: 3600\n          retain: 24\n          path_prefix: /opt/vault/snapshots/\n          storage_type: local\n          local_max_space: 1073741824\n          # - name: hourly-aws\n          #   interval_seconds: 3600\n          #   retain: 24\n          #   path_prefix: /hourly\n          #   storage_type: aws-s3\n          #   aws_s3_bucket: my-bucket\n          #   aws_s3_region: eu-central-1\n          #   aws_access_key_id: some_key\n          #   aws_secret_access_key: some_secret\n          #   aws_s3_enable_kms: false\n          # - name: hourly-azure\n          #   interval_seconds: 3600\n          #   retain: 24\n          #   path_prefix: /hourly/\n          #   storage_type: azure-blob\n          #   azure_container_name: my-blob\n          #   azure_account_name: some_account\n          #   azure_account_key: some_key\n```\n\nThe machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-vault_snapshot/blob/master/molecule/default/prepare.yml):\n\n```yaml\n---\n- name: Prepare\n  hosts: all\n  become: true\n  gather_facts: false\n\n  roles:\n    - role: robertdebock.bootstrap\n    - role: robertdebock.core_dependencies\n    - role: robertdebock.hashicorp\n    - role: robertdebock.vault\n      vault_type: ent\n      vault_hardening_disable_swap: false\n    - role: robertdebock.vault_configuration\n      vault_configuration_license: \"{{ lookup('ansible.builtin.env', 'VAULT_LICENSE') }}\"\n      vault_configuration_listener_tcp:\n        address: \"127.0.0.1:8200\"\n        cluster_address: \"127.0.0.1:8201\"\n        tls_disable: true\n      vault_configuration_storage_raft:\n        path: \"/opt/vault/data\"\n        node_id: \"{{ ansible_hostname }}\"\n\n  tasks:\n    - name: Flush handlers\n      ansible.builtin.meta: flush_handlers\n\n    - name: Start Vault\n      ansible.builtin.service:\n        name: vault\n        state: started\n\n    - name: Initialize Vault\n      ansible.builtin.command:\n        cmd: vault operator init -format=yaml\n      register: vault_init_raw\n      environment:\n        VAULT_ADDR: \"https://localhost:8200\"\n        VAULT_SKIP_VERIFY: \"true\"\n      changed_when: true\n\n    - name: Store vault_init_raw output as YAML\n      ansible.builtin.set_fact:\n        vault_init: \"{{ vault_init_raw.stdout | from_yaml }}\"\n\n    - name: Store root_token\n      ansible.builtin.copy:\n        content: \"{{ vault_init.root_token }}\"\n        dest: /root/.vault-token\n        owner: root\n        group: root\n        mode: \"0640\"\n\n    - name: Unseal Vault\n      ansible.builtin.command:\n        cmd: vault operator unseal {{ item }}\n      loop: \"{{ vault_init.unseal_keys_b64 }}\"\n      environment:\n        VAULT_ADDR: \"https://localhost:8200\"\n        VAULT_SKIP_VERIFY: \"true\"\n      changed_when: true\n      no_log: true\n```\n\nAlso see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.\n\n## [Role Variables](#role-variables)\n\nThe default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-vault_snapshot/blob/master/defaults/main.yml):\n\n```yaml\n---\n# defaults file for vault_snapshot\n\n# Set the vault instance address. Similar to `VAULT_ADDR`.\nvault_snapshot_address: \"https://localhost:8200\"\n\n# Set a token to connect to Vault. Similar to `VAULT_TOKEN`.\nvault_snapshot_token: \"\"\n\n# A list of snapshots to configure. Please have look in `molecule/default/converge.yml` for a complete example.\nvault_snapshot_schedules: []\n\n# Should SSL certificate verification be disabled?\nvault_snapshot_ssl_verify: true\n```\n\n## [Requirements](#requirements)\n\n- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-vault_snapshot/blob/master/requirements.txt).\n\n## [State of used roles](#state-of-used-roles)\n\nThe following roles are used to prepare a system. You can prepare your system in another way.\n\n| Requirement | GitHub | GitLab |\n|-------------|--------|--------|\n|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)|\n|[robertdebock.core_dependencies](https://galaxy.ansible.com/robertdebock/core_dependencies)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-core_dependencies/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-core_dependencies/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-core_dependencies/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-core_dependencies)|\n|[robertdebock.hashicorp](https://galaxy.ansible.com/robertdebock/hashicorp)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-hashicorp/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-hashicorp/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-hashicorp/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-hashicorp)|\n|[robertdebock.vault](https://galaxy.ansible.com/robertdebock/vault)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-vault/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-vault/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-vault/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-vault)|\n|[robertdebock.vault_configuration](https://galaxy.ansible.com/robertdebock/vault_configuration)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-vault_configuration/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-vault_configuration/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-vault_configuration/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-vault_configuration)|\n\n## [Context](#context)\n\nThis role is part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.\n\nHere is an overview of related roles:\n![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-vault_snapshot/png/requirements.png \"Dependencies\")\n\n## [Compatibility](#compatibility)\n\nThis role has been tested on these [container images](https://hub.docker.com/u/robertdebock):\n\n|container|tags|\n|---------|----|\n|[Debian](https://hub.docker.com/r/robertdebock/debian)|all|\n|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|\n|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|all|\n|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|noble, jammy|\n\nThe minimum version of Ansible required is 2.12, tests have been done on:\n\n- The previous version.\n- The current version.\n- The development version.\n\nIf you find issues, please register them on [GitHub](https://github.com/robertdebock/ansible-role-vault_snapshot/issues).\n\n## [License](#license)\n\n[Apache-2.0](https://github.com/robertdebock/ansible-role-vault_snapshot/blob/master/LICENSE).\n\n## [Author Information](#author-information)\n\n[robertdebock](https://robertdebock.nl/)\n\nPlease consider [sponsoring me](https://github.com/sponsors/robertdebock).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-vault_snapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdebock%2Fansible-role-vault_snapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-vault_snapshot/lists"}