User home dir is not always /home
Change-Id: I8f2c693c47fe6314823b119731a2f6a9ff89c720
diff --git a/roles/compute-node/tasks/main.yml b/roles/compute-node/tasks/main.yml
index 4c718cc..53c3c60 100644
--- a/roles/compute-node/tasks/main.yml
+++ b/roles/compute-node/tasks/main.yml
@@ -59,12 +59,11 @@
register: private_key
- name: Ensure SSH Key
- become: yes
+ become: no
copy:
src=files/{{ item }}
- dest=/home/{{ ansible_user }}/.ssh/{{ item }}
+ dest={{ ansible_env['PWD'] }}/.ssh/{{ item }}
owner={{ ansible_user }}
- group={{ ansible_user }}
mode=0600
with_items:
- id_rsa