diff options
author | Markos Chandras <mchandras@suse.de> | 2017-05-10 17:14:22 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2017-05-11 10:20:52 +0100 |
commit | 24d24d0b0d40558c52f87fd610e6107047581892 (patch) | |
tree | 0e73467ab3e9c6d80a76da134d41c058480c92c9 | |
parent | 06326510d547fd36d87e8d75bd504a3f65b80870 (diff) |
prototypes: xci: xci-deploy: Do not use sudo when connecting to remote hosts
In preparation for running xci-deploy as normal user, we do not need to
gain elevated privileges in order to connect to remote hosts. SSH keys
will be placed in user's ssh directory so we can ssh as normal user.
Change-Id: Ieb705515ec191955a646839e8f195d089df184bd
Signed-off-by: Markos Chandras <mchandras@suse.de>
-rwxr-xr-x | prototypes/xci/xci-deploy.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/prototypes/xci/xci-deploy.sh b/prototypes/xci/xci-deploy.sh index 2ce7c6b06..3a65983ac 100755 --- a/prototypes/xci/xci-deploy.sh +++ b/prototypes/xci/xci-deploy.sh @@ -139,7 +139,7 @@ echo "Info: Configured target hosts" #------------------------------------------------------------------------------- echo "Info: Setting up target hosts for openstack-ansible" echo "-----------------------------------------------------------------------" -sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP openstack-ansible \ +ssh root@$OPNFV_HOST_IP "openstack-ansible \ $OPENSTACK_OSA_PATH/playbooks/setup-hosts.yml" | \ tee $LOG_PATH/setup-hosts.log echo "-----------------------------------------------------------------------" @@ -158,7 +158,7 @@ echo "Info: Set up target hosts for openstack-ansible successfuly" echo "Info: Setting up infrastructure" echo "-----------------------------------------------------------------------" echo "xci: running ansible playbook setup-infrastructure.yml" -sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP openstack-ansible \ +ssh root@$OPNFV_HOST_IP "openstack-ansible \ $OPENSTACK_OSA_PATH/playbooks//setup-infrastructure.yml" | \ tee $LOG_PATH/setup-infrastructure.log echo "-----------------------------------------------------------------------" @@ -173,7 +173,7 @@ fi #------------------------------------------------------------------------------- echo "Info: Verifying database cluster" echo "-----------------------------------------------------------------------" -sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP ansible -i $OPENSTACK_OSA_PATH/playbooks/inventory/ \ +ssh root@$OPNFV_HOST_IP "ansible -i $OPENSTACK_OSA_PATH/playbooks/inventory/ \ galera_container -m shell \ -a "mysql -h localhost -e 'show status like \"%wsrep_cluster_%\";'"" \ | tee $LOG_PATH/galera.log @@ -192,7 +192,7 @@ echo "Info: Database cluster verification successful!" #------------------------------------------------------------------------------- echo "Info: Installing OpenStack on target hosts" echo "-----------------------------------------------------------------------" -sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP openstack-ansible \ +ssh root@$OPNFV_HOST_IP "openstack-ansible \ $OPENSTACK_OSA_PATH/playbooks/setup-openstack.yml" | \ tee $LOG_PATH/opnfv-setup-openstack.log echo "-----------------------------------------------------------------------" |