Yet another work around to make OpenWRT backups work via Ansible, still less terrible than PFSense

This commit is contained in:
Bradley committed 2026-11-27 21:47:02 -05:00
1 parent 7c11ff2d6f
commit 9e5e7e899c
1 file changed
+10 -4
+10 -4
View File
@@ -20,11 +20,17 @@
community.openwrt.command: community.openwrt.command:
cmd: "sysupgrade -b {{ remote_tmp_file }}" cmd: "sysupgrade -b {{ remote_tmp_file }}"
- name: Fetch backup archive to Ansible controller - name: Read backup archive into memory
ansible.builtin.fetch: community.openwrt.slurp:
src: "{{ remote_tmp_file }}" src: "{{ remote_tmp_file }}"
dest: "{{ backup_dir }}/" register: backup_archive
flat: true
- 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 - name: Remove temporary backup file from OpenWrt
community.openwrt.file: community.openwrt.file: