Add script to generate clusterssh list from pve

master
Jeff Moe 6 years ago
parent b819d3f1e6
commit 7660c5e350

@ -0,0 +1,14 @@
#!/bin/bash
for i in \
`ssh sf-001 sudo pvesh get pools 2>/dev/null | grep poolid | cut -f 4 -d '"'`
do echo -n "sf-$i " | tr '[:upper:]' '[:lower:]'
echo -n `ssh sf-001 sudo pvesh get pools/$i 2>/dev/null | grep '"name"' |cut -f 4 -d '"'`
echo
ALL="$ALL sf-`echo -n $i | tr '[:upper:]' '[:lower:]'`"
done
echo "sf-vm $ALL"

@ -0,0 +1,4 @@
#!/bin/bash
ssh sf-001 sudo pvesh get pools 2>/dev/null | grep poolid | cut -f 4 -d '"'

@ -0,0 +1,11 @@
#!/bin/bash
for i in \
`ssh sf-001 sudo pvesh get pools 2>/dev/null | grep poolid | cut -f 4 -d '"'`
do echo "Pool $i"
ssh sf-001 sudo pvesh get pools/$i 2>/dev/null | grep '"name"' |cut -f 4 -d '"'
echo
done
Loading…
Cancel
Save