From b01ce04ad4d6143eb8ca7f3c0166e4db09aa3ece Mon Sep 17 00:00:00 2001 From: jaydee Date: Tue, 29 Aug 2023 14:02:11 +0200 Subject: [PATCH] upt playbook --- playbooks/sync_mailu.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/playbooks/sync_mailu.yaml b/playbooks/sync_mailu.yaml index 93f3a99..90b47dc 100644 --- a/playbooks/sync_mailu.yaml +++ b/playbooks/sync_mailu.yaml @@ -98,10 +98,14 @@ X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg=" timeout: 60 register: result - ignore_errors: yes when: inventory_hostname in groups['nas'] - name: Copy archive - ansible.builtin.shell: 'scp /share/Data/dockers-{{ ansible_date_time.date }}.tar.gz admin@192.168.77.246:/share/' - ignore_errors: yes - when: inventory_hostname in groups['nas'] \ No newline at end of file + ansible.builtin.shell: 'scp /share/Data/dockers-{{ ansible_date_time.date }}.tar.gz admin@192.168.77.246:/tmp/' + when: inventory_hostname in groups['nas'] + + - name: Unpack archive + ansible.builtin.shell: 'tar -xzvf /tmp/{{ ansible_date_time.date }}.tar.gz -C /' + become: yes + when: inventory_hostname in groups['nas'] + \ No newline at end of file