From 7132da591c7a089ea95748fcee9e99d21f991fe8 Mon Sep 17 00:00:00 2001 From: hms Date: Wed, 3 Feb 2021 14:50:21 -0800 Subject: [PATCH] added ability to pull groups from cert --- update-NebulaNodeCert | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/update-NebulaNodeCert b/update-NebulaNodeCert index d4e674a..9409559 100644 --- a/update-NebulaNodeCert +++ b/update-NebulaNodeCert @@ -35,6 +35,8 @@ set -- "${POSITIONAL[@]}" # restore positional parameters NODENAME=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s .[].details.name | sed 's/["]//g') NODEIPS=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.ips | sed 's/[]["]//g') +NODEGROUPS=($(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.groups | sed 's/[]["]//g' | sed 's/./ /g')) echo "Node Name: ${NODENAME}" -echo "Node IPs: ${NODEIPS}" \ No newline at end of file +echo "Node IPs: ${NODEIPS}" +echo "Node Groups: ${NODEGROUPS}" \ No newline at end of file