parent
097bba7aae
commit
6ad11bee64
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# eqx-get-project-ssh-config
|
||||
#
|
||||
# Give a project name, generate an ~/.ssh/config snippet.
|
||||
|
||||
EQXPROJECT="$1"
|
||||
|
||||
if [[ $1 == "" ]]
|
||||
then \
|
||||
echo -e "Need project name, such as:\n"
|
||||
eqx-get-project-names
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "# Add to ~/.clusterssh/clusters"
|
||||
echo -n "$EQXPROJECT "
|
||||
# For each Device, get hostname and IP
|
||||
for EQXDEVICEID in `eqx-get-project-devices-id "$EQXPROJECT"`
|
||||
do \
|
||||
echo -n "`eqx-get-deviceid-hostname $EQXDEVICEID` "
|
||||
done
|
||||
echo
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
eqx-get-projects | jq --raw-output '.[] | {name}' | grep name | cut -f 2 -d ":" | sed -e 's/ //g' -e 's/"//g' | sort -V
|
||||
eqx-get-projects \
|
||||
| jq --raw-output '.[] | {name}' | grep name | cut -f 2 -d ":" | sed -e 's/ //g' -e 's/"//g' | sort -V
|
||||
|
||||
|
Loading…
Reference in new issue