document the ability to pass ssh options.
This commit is contained in:
parent
bef3896ff0
commit
cd2d50c32e
@ -277,12 +277,15 @@ if __name__ == "__main__":
|
|||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
### Parse CLI Args ###
|
### Parse CLI Args ###
|
||||||
parser = argparse.ArgumentParser(description="Connect to multiple servers in parallel.", usage="%(prog)s [OPTIONS] HOST [HOST ...]")
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Connect to multiple servers in parallel.",
|
||||||
|
usage="%(prog)s [OPTIONS] [--] HOST [HOST ...]",
|
||||||
|
epilog="* NOTE: You can pass options to ssh if you add '--' before your list of hosts")
|
||||||
(args, hosts) = parser.parse_known_args()
|
(args, hosts) = parser.parse_known_args()
|
||||||
|
|
||||||
if len(hosts) == 0:
|
if len(hosts) == 0:
|
||||||
parser.print_usage()
|
parser.print_usage()
|
||||||
sys.exit(1)
|
parser.exit(2)
|
||||||
|
|
||||||
if "--" in hosts:
|
if "--" in hosts:
|
||||||
offset = hosts.index("--") + 1
|
offset = hosts.index("--") + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user