summaryrefslogtreecommitdiffstats
path: root/tutorials/vFWDT/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'tutorials/vFWDT/playbooks')
-rwxr-xr-xtutorials/vFWDT/playbooks/configure_ansible.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tutorials/vFWDT/playbooks/configure_ansible.sh b/tutorials/vFWDT/playbooks/configure_ansible.sh
index c49153f8..e5a42d04 100755
--- a/tutorials/vFWDT/playbooks/configure_ansible.sh
+++ b/tutorials/vFWDT/playbooks/configure_ansible.sh
@@ -74,8 +74,12 @@ echo "vPGN Playbooks uploaded"
APPCDB=`kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | grep appc-db-0`
echo $APPCDB
-kubectl exec -n onap $APPCDB -- mysql -u sdnctl -pgamma sdnctl -e'SELECT * FROM DEVICE_AUTHENTICATION WHERE PROTOCOL LIKE "ANSIBLE";'
-kubectl exec -n onap $APPCDB -- mysql -u sdnctl -pgamma sdnctl -e'UPDATE DEVICE_AUTHENTICATION SET URL = "http://appc-ansible-server:8000/Dispatch" WHERE PROTOCOL LIKE "ANSIBLE" AND PASSWORD IS NULL;'
-kubectl exec -n onap $APPCDB -- mysql -u sdnctl -pgamma sdnctl -e'UPDATE DEVICE_AUTHENTICATION SET PASSWORD = "admin" WHERE PROTOCOL LIKE "ANSIBLE" AND PASSWORD IS NULL;'
-kubectl exec -n onap $APPCDB -- mysql -u sdnctl -pgamma sdnctl -e'SELECT * FROM DEVICE_AUTHENTICATION WHERE PROTOCOL LIKE "ANSIBLE";'
+APPC_SECRET=`kubectl get secrets | grep appc-db-root-pass`
+APPC_PWD=`./get_secret.sh $APPC_SECRET`
+echo "SECRET: $APPC_PWD"
+
+kubectl exec -n onap $APPCDB -- mysql -u root -p$APPC_PWD sdnctl -e'SELECT * FROM DEVICE_AUTHENTICATION WHERE PROTOCOL LIKE "ANSIBLE";'
+kubectl exec -n onap $APPCDB -- mysql -u root -p$APPC_PWD sdnctl -e'UPDATE DEVICE_AUTHENTICATION SET URL = "http://appc-ansible-server:8000/Dispatch" WHERE PROTOCOL LIKE "ANSIBLE" AND PASSWORD IS NULL;'
+kubectl exec -n onap $APPCDB -- mysql -u root -p$APPC_PWD sdnctl -e'UPDATE DEVICE_AUTHENTICATION SET PASSWORD = "admin" WHERE PROTOCOL LIKE "ANSIBLE" AND PASSWORD IS NULL;'
+kubectl exec -n onap $APPCDB -- mysql -u root -p$APPC_PWD sdnctl -e'SELECT * FROM DEVICE_AUTHENTICATION WHERE PROTOCOL LIKE "ANSIBLE";'
echo "APPC database configured for LCM commands"