From 74243080bbe7219cddbc09855042be0d6adaa560 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 23 May 2023 09:50:04 -0500 Subject: [PATCH] r/burp-client: Support pre/post-restore scripts BURP can run scripts before and after restore. This may be useful, for example, to clean up files in a backup that may be in an inconsistent state. --- roles/burp-client/tasks/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/roles/burp-client/tasks/main.yml b/roles/burp-client/tasks/main.yml index a78136f..b935a60 100644 --- a/roles/burp-client/tasks/main.yml +++ b/roles/burp-client/tasks/main.yml @@ -40,6 +40,22 @@ dest={{ burp_backup_script_post }} mode=0755 when: burp_backup_script_post is defined +- name: ensure burp pre-restore script is installed + copy: + src: scripts/{{ inventory_hostname }}/{{ burp_restore_script_pre|basename }} + dest: '{{ burp_restore_script_pre }}' + owner: root + group: root + mode: u=rwx,go=rx + when: burp_restore_script_pre is defined +- name: ensure burp post-restore script is installed + copy: + src: scripts/{{ inventory_hostname }}/{{ burp_restore_script_post|basename }} + dest: '{{ burp_restore_script_post }}' + owner: root + group: root + mode: u=rwx,go=rx + when: burp_restore_script_post is defined - name: ensure burp client is configured template: src=burp.conf.j2