-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathos-mac-oc
More file actions
executable file
·28 lines (25 loc) · 872 Bytes
/
os-mac-oc
File metadata and controls
executable file
·28 lines (25 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# vim: set noet sw=4 ts=4:
if [[ "$OS_CLOUDNAME" != "undercloud" ]]; then
if [[ -e $HOME/stackrc ]]; then
source $HOME/stackrc
elif [[ -e /home/stack/stackrc ]]; then
source $HOME/stackrc
fi
if [[ "$OS_CLOUDNAME" != "undercloud" ]]; then
echo "To use this, source undercloud rc file." >&2
exit 1
fi
fi
SSHOPTS=""
SSHOPTS="${SSHOPTS} -o GSSAPIAuthentication=no "
SSHOPTS="${SSHOPTS} -o CheckHostIP=no"
SSHOPTS="${SSHOPTS} -o StrictHostKeyChecking=no"
SSHOPTS="${SSHOPTS} -o UserKnownHostsFile=/dev/null"
while read VMIP; do
if [[ "$USER" != "stack" ]]; then
su stack -c ssh heat-admin@$VMIP 'echo "$(hostname) $(/usr/sbin/ip l show dev eth0|sed -nr "s/.*\/ether //p")"'
else
ssh heat-admin@$VMIP 'echo "$(hostname) $(/usr/sbin/ip l show dev eth0|sed -nr "s/.*\/ether //p")"'
fi
done < <(nova list | sed -nr 's/.*ctlplane=(\S+).*/\1/p')