Skip to content
Snippets Groups Projects
Commit 7b1eb9c7 authored by František Dvořák's avatar František Dvořák
Browse files

demo: switch secrets to fedcloud vault

parent 67849f0d
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,8 @@ ip="$(head -n 1 < terraform/fip.txt)" ...@@ -13,7 +13,8 @@ ip="$(head -n 1 < terraform/fip.txt)"
shellstate=$(shopt -po xtrace) shellstate=$(shopt -po xtrace)
set +o xtrace set +o xtrace
# https://nsupdate.fedcloud.eu # https://nsupdate.fedcloud.eu
FEDCLOUD_DYNAMIC_DNS=$(vault kv get -mount=eosc/demo -field 'data' -format table FEDCLOUD_DYNAMIC_DNS | grep ^map | head -n 1 | sed 's/map\[\(.*\)\]/\1/') vault_prefix=/users/e1662e20-e34b-468c-b0ce-d899bc878364@egi.eu/eosc-demo
FEDCLOUD_DYNAMIC_DNS=$(vault read -field data secrets/$vault_prefix/FEDCLOUD_DYNAMIC_DNS | grep ^map | head -n 1 | sed 's/map\[\(.*\)\]/\1/')
for auth in $FEDCLOUD_DYNAMIC_DNS; do for auth in $FEDCLOUD_DYNAMIC_DNS; do
echo "curl -i -X GET -u $(echo "$auth" | cut -d: -f1):XXX https://nsupdate.fedcloud.eu/nic/update?myip=$ip" echo "curl -i -X GET -u $(echo "$auth" | cut -d: -f1):XXX https://nsupdate.fedcloud.eu/nic/update?myip=$ip"
curl -i -X GET -u "$auth" https://nsupdate.fedcloud.eu/nic/update?myip="$ip" curl -i -X GET -u "$auth" https://nsupdate.fedcloud.eu/nic/update?myip="$ip"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment