Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Remove jmespath requirement with native solution. #122

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

markstos
Copy link
Contributor

@markstos markstos commented Apr 4, 2024

Issue: #121

QA Log

I created a playbook which demonstrated that the same result was produced before and after the change:

---
- name: backup your homefolders to /mnt/backup everyday night
  hosts: localhost
  #roles:
  #  - {role: ./, tags: restic}
  vars:
    restic_create_schedule: true
    restic_repos:
      local:
        location: '/mnt/backup'
        password: 'ChangM3'
        init: true

  tasks:
    - name: "Debug jmespath"
      tags: debug
      vars:
        restic_backups:
          top-level:
             keep_daily: 7
             keep_weeky: 4
          mop-level:
             keep_daily: 7
             keep_weeky: 4
      tags: debug
      debug:
        msg: "{{ restic_backups | dict2items | json_query('[*].value') }}"

    - name: "Debug Proposed"
      tags: debug
      vars:
        restic_backups:
          top-level:
             keep_daily: 7
             keep_weeky: 4
          mop-level:
             keep_daily: 7
             keep_weeky: 4
      tags: debug
      debug:
        msg: "{{ restic_backups | default([]) | map('extract', restic_backups) | list }}"

@DO1JLR DO1JLR merged commit 2119bb8 into roles-ansible:main Apr 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants