CORD-1401 Don't overwrite existing keypair, CiaB PCU setup roles
Change-Id: Ia0fe60315ed09ba39634ed5c25e50e7bfd51d1ab
diff --git a/roles/ssh-key/tasks/main.yml b/roles/ssh-key/tasks/main.yml
index 44ce66e..17f8368 100644
--- a/roles/ssh-key/tasks/main.yml
+++ b/roles/ssh-key/tasks/main.yml
@@ -15,7 +15,7 @@
- name: Ensure Key Authorized on Target Head Node
authorized_key:
- user: '{{ansible_ssh_user}}'
+ user: '{{ansible_user_id}}'
key: "{{lookup('file', '~/.ssh/id_rsa.pub')}}"
tags:
- establish_ssh_keys