Switch from user to become-user
Kubespray documentation advices to use --become and
--become-user==root while running the playbook. In
order to ensure we can do this, we need the user who
is executing deploy.sh captured and created on target
nodes.
https://github.com/kubernetes-sigs/kubespray#usage
Change-Id: Idc0bc5819d47e3e7530d274be65473aac397ca3c
diff --git a/deploy.sh b/deploy.sh
index a8bdcce..85681cc 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -59,7 +59,7 @@
cd ${ENGINE_CACHE}/repos/kubespray
ansible-playbook ${ENGINE_ANSIBLE_PARAMS} \
--ssh-extra-args='-o StrictHostKeyChecking=no' \
- --user root \
+ --become --become-user=root \
-e "http_proxy=${http_proxy:-}" \
-e "https_proxy=${https_proxy:-}" \
-e "additional_no_proxy=${no_proxy:-}" \