Skip to content

ng_backup_rotate.yml fails to move the backup file to the correct location #86

@zpe-reneneumann

Description

@zpe-reneneumann

In the current Devoplment Branch die we have to fix the existing example for ng_backup_rotate.yml

The playbook executes but fetches the file to the wrong location, as it is not using the correct variable, but uses /tmp/

Task with issue

      - name: Fetch Backup file to Control Node
        ansible.builtin.fetch:
          # Source path on the remote host
          src: "/backup/{{ nodegrid_backup.backup_filename }}" 
          # Destination directory on the local (control) machine
          dest: "/tmp/{{ inventory_hostname }}/{{ nodegrid_backup.backup_filename }}" 
          # Optional parameter to save the file directly to the dest path without creating a hostname/path structure
          flat: yes

Correct version

      - name: Fetch Backup file to Control Node
        ansible.builtin.fetch:
          # Source path on the remote host
          src: "/backup/{{ nodegrid_backup.backup_filename }}" 
          # Destination directory on the local (control) machine
          dest: "/{{backup_files_directory}}/{{ inventory_hostname }}/{{ nodegrid_backup.backup_filename }}" 
          # Optional parameter to save the file directly to the dest path without creating a hostname/path structure
          flat: yes

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions