summaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
Diffstat (limited to 'deployment')
-rw-r--r--deployment/playbooks/crs-setup.yaml5
1 files changed, 4 insertions, 1 deletions
diff --git a/deployment/playbooks/crs-setup.yaml b/deployment/playbooks/crs-setup.yaml
index abe59eff..ea84a27e 100644
--- a/deployment/playbooks/crs-setup.yaml
+++ b/deployment/playbooks/crs-setup.yaml
@@ -25,9 +25,12 @@
- hosts: localhost
ignore_errors: no
tasks:
+ - name: Get home dir of the current user
+ shell: "getent passwd $(whoami) | cut -d: -f6"
+ register: user_home_dir
- name: Define path for the SSH key
set_fact:
- crs_ssh_keypath: "/root/.ssh/crs_nodes_{{
+ crs_ssh_keypath: "{{ user_home_dir.stdout_lines[0].strip() }}/.ssh/crs_nodes_{{
cluster_id + '_' + (999999999999999 | random | string ) }}"
- name: Generate SSH key pair for Heketi and CRS interactions
shell: "yes y| ssh-keygen -b 2048 -t rsa -f {{ crs_ssh_keypath }} -q -N ''"