[CORD-3083]v2 Fix scripts to pass shellcheck
This also paramterizes the username on remote systems
Made invoking copy-ssh-keys.sh optional, as it isn't
required if the user has already distributed keys.
Change-Id: I8d35af47281b77ab0b36bb4cd31a136e850ab0e2
diff --git a/kubespray-installer/k8s-configs.yaml b/kubespray-installer/k8s-configs.yaml
index cb8ae78..b998a06 100644
--- a/kubespray-installer/k8s-configs.yaml
+++ b/kubespray-installer/k8s-configs.yaml
@@ -15,12 +15,8 @@
#
- hosts: localhost
-
vars:
- tryluca:
- - one
- - two
- - three
+ kubespray_remote_ssh_user: "cord"
tasks:
# Edit all.yml variable file
@@ -33,7 +29,7 @@
- name: Add default Ansible user
lineinfile:
path: inventories/{{ deployment_name }}/group_vars/all.yml
- line: 'ansible_user: cord'
+ line: 'ansible_user: {{ kubespray_remote_ssh_user }}'
- name: Give sudoer permissions
lineinfile: