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