diff options
author | Markos Chandras <mchandras@suse.de> | 2017-05-10 17:14:22 +0100 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2017-08-11 12:56:12 -0700 |
commit | 29e06269bb1b9c40e1167845d128a03aacb78ea0 (patch) | |
tree | a65f3af04bc7a192964b48ed28f20cb81961a448 /xci | |
parent | 9a6300f9dfba51b4b121885c3507ac55c046ec57 (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>
Diffstat (limited to 'xci')
-rwxr-xr-x | xci/xci-deploy.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 2ce7c6b0..3a65983a 100755 --- a/xci/xci-deploy.sh +++ b/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 "-----------------------------------------------------------------------" |