From 2adb6c0cfccc0ea0649b600f2ab9b69a81110005 Mon Sep 17 00:00:00 2001 From: Bradley Bickford Date: Sat, 28 Nov 2026 20:58:58 -0500 Subject: [PATCH] More OpenWRT work --- inventories/core_infrastructure.yml | 7 +++++++ playbooks/new_backup_protocol.yml | 27 ++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/inventories/core_infrastructure.yml b/inventories/core_infrastructure.yml index f33c83e..b08b53c 100644 --- a/inventories/core_infrastructure.yml +++ b/inventories/core_infrastructure.yml @@ -3,6 +3,13 @@ all: hosts: openwrt: ansible_host: "10.77.7.254" + borg_password: !vault | + $ANSIBLE_VAULT;1.2;AES256;infra_vault + 36313737376532653863653230663934303735303639323966393433653638346133303333383066 + 3166616635363862376565363736613531303236376437320a313030313161326633316564323136 + 30346462613863373231356433306561323263643565656263626564393633653163333635306363 + 3832333362306462640a393436633965336639643565333532653965633939616263336236613437 + 35356661316133376630343239656230613831646632646436623436303136613633 blacktide: ansible_host: "192.168.3.2" connection: "local" diff --git a/playbooks/new_backup_protocol.yml b/playbooks/new_backup_protocol.yml index 9aae907..b14d728 100644 --- a/playbooks/new_backup_protocol.yml +++ b/playbooks/new_backup_protocol.yml @@ -50,4 +50,29 @@ src: "{{ backup_dir }}/{{ remote_tmp_file | basename }}" dest: "{{ unarchive_where }}" remote_src: false - delegate_to: localhost \ No newline at end of file + delegate_to: localhost + + - name: Attempt to trigger a borg backup + ansible.builtin.shell: + cmd: > + borg create --stats --progress --compression lz4 + ssh://borg@10.42.0.3:2222/var/backups/borg/openwrt::{now:%Y-%m-%d-%H-%M-%s} + {{ unarchive_where }}/ + stdin: "{{ borg_password }}" + register: borg_backup + delegate_to: localhost + + - name: Cleanup backup dir + ansible.builtin.file: + path: "{{ backup_dir }}" + state: absent + recurse: true + delegate_to: localhost + + - name: Cleanup unarchive_where + ansible.builtin.file: + path: "{{ unarchive_where }}" + state: absent + recurse: true + delegate_to: localhost + \ No newline at end of file