From de52b1a16efa4482b3078b516a8d1e557d8dd2b5 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 14 Mar 2025 11:32:02 +0100 Subject: [PATCH] Optimized .mds and meta/main.yml for backup-directory-validator --- roles/backup-directory-validator/README.md | 20 ++++++++++++++ .../backup-directory-validator/meta/main.yml | 26 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 roles/backup-directory-validator/README.md create mode 100644 roles/backup-directory-validator/meta/main.yml diff --git a/roles/backup-directory-validator/README.md b/roles/backup-directory-validator/README.md new file mode 100644 index 00000000..d4289405 --- /dev/null +++ b/roles/backup-directory-validator/README.md @@ -0,0 +1,20 @@ +# Backup Directory Validator + +## Description + +This Ansible role pulls the [directory-validator](https://github.com/kevinveenbirkenbach/directory-validator.git) repository to a predefined location. It is used by the backup-docker-to-local and cleanup-failed-docker-backups roles to verify whether backups have been successfully created. + +## Overview + +The role retrieves the latest version of the directory-validator from its Git repository and installs it into the designated folder (configured via the `backup_directory_validator_folder` variable). A fact is set to ensure that the repository is pulled only once per playbook run. + +## Purpose + +The primary purpose of this role is to validate backup directories. By fetching the directory-validator tool, it enables dependent roles to assess the integrity and success of backup operations. + +## Features + +- **Git Repository Pull:** Automatically pulls the latest version of the directory-validator from Git. +- **Idempotent Execution:** Ensures that the repository is fetched only once per playbook run. +- **Backup Verification:** Serves as a validation step for other backup-related roles. +- **Configurable Destination:** The target folder is customizable via the `backup_directory_validator_folder` variable. diff --git a/roles/backup-directory-validator/meta/main.yml b/roles/backup-directory-validator/meta/main.yml new file mode 100644 index 00000000..a5dc4229 --- /dev/null +++ b/roles/backup-directory-validator/meta/main.yml @@ -0,0 +1,26 @@ +--- +galaxy_info: + author: "Kevin Veen-Birkenbach" + description: "Setup the directory validator to validate backup directories" + license: "CyMaIS NonCommercial License (CNCL)" + license_url: "https://s.veen.world/cncl" + company: | + Kevin Veen-Birkenbach + Consulting & Coaching Solutions + https://www.veen.world + min_ansible_version: "2.9" + platforms: + - name: Linux + versions: + - all + galaxy_tags: + - backup + - validator + - directory + - git + - automation + repository: "https://s.veen.world/cymais" + issue_tracker_url: "https://s.veen.world/cymaisissues" + documentation: "https://s.veen.world/cymais" + +dependencies: []