From: Oleg Broytman Date: Tue, 16 Jul 2019 00:13:48 +0000 (+0300) Subject: Fix(debian-init-system): Combine uploading and extracting X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=0d9256475d2ee4b9e1a8ba90cc707eb1ed3da52a;p=ansible.git Fix(debian-init-system): Combine uploading and extracting Combine uploading and extracting in one step using module `unarchive`. Extract directly to `/home/phd`. --- diff --git a/playbooks/roles/debian-phd/tasks/setup-home.yml b/playbooks/roles/debian-phd/tasks/setup-home.yml index 9d6b1cd..a000aec 100644 --- a/playbooks/roles/debian-phd/tasks/setup-home.yml +++ b/playbooks/roles/debian-phd/tasks/setup-home.yml @@ -1,16 +1,4 @@ -- name: Upload archive - copy: +- name: Upload and extract archive + unarchive: src: ~/archive/STORE/phd/Home/phd.tar.bz2 - dest: /tmp - -- name: Extract archive - shell: "cd /tmp && bzcat phd.tar.bz2 | tar xf -" - -- name: Copy home - command: rsync -a /tmp/phd /home - -- name: Cleanup - file: - path: "{{ item }}" - state: absent - loop: ['/tmp/phd', '/tmp/phd.tar.bz2'] + dest: /home