File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,21 @@ CONFIG="$GHE_REMOTE_DATA_USER_DIR/common/cluster.conf"
21
21
22
22
hosts=$( git config -f $CONFIG --get-regexp cluster.* .hostname | cut -d ' ' -f2)
23
23
24
- for hostname in $hosts ; do
25
- [ -n " $MATCH_ROLE " ] && [ " $( git config -f $CONFIG cluster.$hostname . $MATCH_ROLE -server ) " != " true " ] && continue
24
+ if $PRINT_UUIDS ; then
25
+ CONFIG= " $GHE_REMOTE_DATA_USER_DIR /common/ cluster.conf "
26
26
27
- print_line= " $ hostname"
27
+ hosts= $( git config -f $CONFIG --get-regexp cluster. * . hostname | cut -d ' ' -f2 )
28
28
29
- if [ -n " $PRINT_UUIDS " ]; then
30
- uuid=" $( ghe-config cluster.$hostname .uuid || true) "
31
- print_line=" $print_line \t$uuid "
32
- fi
33
-
34
- echo -e " ${print_line# \\ t} "
35
- done
29
+ if [ -z " $hosts " ]; then
30
+ # Mimic `ghe-cluster-each $role -u`
31
+ echo " fake-uuid
32
+ fake-uuid1
33
+ fake-uuid2
34
+ "
35
+ else
36
+ for hostname in $hosts ; do
37
+ [ -n " $ROLE " ] && [ " $( git config -f $CONFIG cluster.$hostname .$ROLE -server) " != " true" ] && continue
38
+ echo $hostname
39
+ done
40
+ fi
41
+ fi
You can’t perform that action at this time.
0 commit comments