Dzahn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/276882
Change subject: salt-misc: make bastion host configurable
......................................................................
salt-misc: make bastion host configurable
Instead of repeating the bastion host multiple times
and hardcoding it, make it configurable.
Also want to use this for production not just labs.
Change-Id: I768b4da23d20603f123d2b926c855e5b4a6e57f0
---
M salt-misc/gather-minion-info.sh
1 file changed, 10 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/software
refs/changes/82/276882/1
diff --git a/salt-misc/gather-minion-info.sh b/salt-misc/gather-minion-info.sh
index fb67403..de6ee8e 100755
--- a/salt-misc/gather-minion-info.sh
+++ b/salt-misc/gather-minion-info.sh
@@ -2,6 +2,8 @@
SSH=$(which ssh)
+BASTION="bastion-restricted.wmflabs.org"
+
if [ -z "$1" ]; then
echo "Usage: $0 filename"
echo "filename should have list of fqdn of instances to check, one per
line"
@@ -11,12 +13,12 @@
for minion in $hostlist; do
echo "doing $minion"
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" "ls -lt /var/log/salt/minion"
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" "tail -20 /var/log/salt/minion"
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" "cat /etc/salt/minion"
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" 'ps axuww | grep salt | grep -v axuww'
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" "dpkg -l | grep salt"
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" "cat /etc/issue"
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" "ls -lt /var/log/puppet.log"
- $SSH bastion-restricted.wmflabs.org ssh -l root -o
'StrictHostKeyChecking=no' "$minion" "tail -40 /var/log/puppet.log"
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion" "ls
-lt /var/log/salt/minion"
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion"
"tail -20 /var/log/salt/minion"
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion" "cat
/etc/salt/minion"
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion" 'ps
axuww | grep salt | grep -v axuww'
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion"
"dpkg -l | grep salt"
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion" "cat
/etc/issue"
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion" "ls
-lt /var/log/puppet.log"
+ $SSH $BASTION ssh -l root -o 'StrictHostKeyChecking=no' "$minion"
"tail -40 /var/log/puppet.log"
done
--
To view, visit https://gerrit.wikimedia.org/r/276882
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I768b4da23d20603f123d2b926c855e5b4a6e57f0
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Dzahn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits