]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/debian-phd/tasks/setup-home.yml
Feat(debian-phd): Setup home directory
[ansible.git] / playbooks / roles / debian-phd / tasks / setup-home.yml
diff --git a/playbooks/roles/debian-phd/tasks/setup-home.yml b/playbooks/roles/debian-phd/tasks/setup-home.yml
new file mode 100644 (file)
index 0000000..9d6b1cd
--- /dev/null
@@ -0,0 +1,16 @@
+- name: Upload archive
+  copy:
+    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']