From 48f820b60f284b2bb9aea5c35b580b2148c1b37f Mon Sep 17 00:00:00 2001 From: Stonewall Jackson Date: Mon, 13 Feb 2023 20:56:47 -0500 Subject: move freeipa and asterisk archive commands to role vars --- playbooks/asterisk.yml | 5 +---- playbooks/freeipa.yml | 7 +------ 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'playbooks') diff --git a/playbooks/asterisk.yml b/playbooks/asterisk.yml index 0d4bb24..5dce703 100644 --- a/playbooks/asterisk.yml +++ b/playbooks/asterisk.yml @@ -10,8 +10,5 @@ - role: archive_job archive_name: asterisk archive_user: asterisk - archive_shell: >- - TIMESTAMP=$(date +%Y%m%d%H%M%S); - tar czf "asterisk-${TIMESTAMP}.tar.gz" - --transform "s|^\.|asterisk-${TIMESTAMP}|" -C {{ asterisk_data_dir }} . + archive_shell: '{{ asterisk_archive_shell }}' tags: archive diff --git a/playbooks/freeipa.yml b/playbooks/freeipa.yml index 77ba9b3..78e85e1 100644 --- a/playbooks/freeipa.yml +++ b/playbooks/freeipa.yml @@ -13,12 +13,7 @@ - role: archive_job archive_name: ipa archive_on_calendar: 'Sat *-*-* 02:00:00' - archive_shell: >- - ipa-backup && - find {{ freeipa_backup_dir | quote }} -mindepth 1 -maxdepth 1 -type d - -exec cp --preserve=timestamps -vr {} . \; - -exec rm -vrf {} \; && - find . -mindepth 1 -type d -exec chmod -v 770 {} + + archive_shell: '{{ freeipa_archive_shell }}' tags: archive - name: configure freeipa replicas -- cgit