From 097c7b866a27c6d809a4d16963f6f8fe8ef4166d Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 23 Nov 2021 13:18:47 +0100 Subject: [PATCH] Start developing cleanup playbook for semaphore. --- semaphore.yaml | 17 +++++++++++++++++ vars/semaphore/variable.yaml | 1 + 2 files changed, 18 insertions(+) create mode 100644 semaphore.yaml create mode 100644 vars/semaphore/variable.yaml diff --git a/semaphore.yaml b/semaphore.yaml new file mode 100644 index 0000000..5a349dd --- /dev/null +++ b/semaphore.yaml @@ -0,0 +1,17 @@ +--- +# This playbook cleans up its own backup directory. +- name: Cleanup semaphore + hosts: all + gather_facts: true + + tasks: + - include_vars: vars/odroid/variable.yaml + + - name: Search for backup directories + find: + paths: "{{ local_backup }}" + file_type: directory + recurse: false + register: backup_dirs + + - debug: var=backup_dirs diff --git a/vars/semaphore/variable.yaml b/vars/semaphore/variable.yaml new file mode 100644 index 0000000..cf0022c --- /dev/null +++ b/vars/semaphore/variable.yaml @@ -0,0 +1 @@ +local_backup: /home/semaphore/backup