From 9e5e7e899c82a3ee1e9e75231ef6716f127a361f Mon Sep 17 00:00:00 2001 From: Bradley Bickford Date: Fri, 27 Nov 2026 21:47:02 -0500 Subject: [PATCH] Yet another work around to make OpenWRT backups work via Ansible, still less terrible than PFSense --- playbooks/new_backup_protocol.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/playbooks/new_backup_protocol.yml b/playbooks/new_backup_protocol.yml index 3cd795b..1bb8376 100644 --- a/playbooks/new_backup_protocol.yml +++ b/playbooks/new_backup_protocol.yml @@ -20,11 +20,17 @@ community.openwrt.command: cmd: "sysupgrade -b {{ remote_tmp_file }}" - - name: Fetch backup archive to Ansible controller - ansible.builtin.fetch: + - name: Read backup archive into memory + community.openwrt.slurp: src: "{{ remote_tmp_file }}" - dest: "{{ backup_dir }}/" - flat: true + register: backup_archive + + - name: Save backup archive to Ansible controller + ansible.builtin.copy: + content: "{{ backup_archive.content | b64decode }}" + dest: "{{ backup_dir }}/{{ remote_tmp_file | basename }}" + mode: '0600' + delegate_to: localhost - name: Remove temporary backup file from OpenWrt community.openwrt.file: