You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
475 B

7 years ago
  1. #!/usr/bin/python
  2. import subprocess
  3. import argparse
  4. import json
  5. with open(hostnames.json) as file:
  6. hostnames = json.load(file)
  7. parser = argparse.ArgumentParser()
  8. parser.add_argument(-o,-wan,action = store_true)
  9. parser.add_argument(name,help=name of config file to use (sans .cfg))
  10. parser.add_argument(arg,nargs = *)
  11. args = parser.parse_args()
  12. cmd = [ssh,-F,~/.ssh/{}.cfg.format(args.name)]
  13. subprocess.call(