Yet another work around to make OpenWRT backups work via Ansible, still less terrible than PFSense
This commit is contained in:
1 parent
7c11ff2d6f
commit
9e5e7e899c
1 file changed
+10
-4
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user