From b45ec6542743ec26f03a1ccb02e0a4af2ee457b3 Mon Sep 17 00:00:00 2001 From: Mark Stosberg Date: Thu, 4 Apr 2024 07:27:05 -0400 Subject: [PATCH] deps: Remove jmespath requirement with native solution. Issue: #121 --- README.md | 2 +- tasks/backup.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 382c915..713e986 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,8 @@ There are multiple ways to install the role. Either clone or download it directl ansible-galaxy install roles-ansible.restic ``` ## Requirements + * bzip2 -* jmespath ## Role Variables diff --git a/tasks/backup.yml b/tasks/backup.yml index 55b438a..ba7c253 100644 --- a/tasks/backup.yml +++ b/tasks/backup.yml @@ -1,7 +1,7 @@ --- - name: (BACKUP) reformat dict if necessary ansible.builtin.set_fact: - restic_backups: "{{ restic_backups | dict2items | json_query('[*].value') }}" + restic_backups: "{{ restic_backups | default([]) | map('extract', restic_backups) | list }}" when: - restic_backups | type_debug == "dict"