diff options
-rwxr-xr-x | bin/ohi | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -64,7 +64,11 @@ class Ohi(object): raise ArgumentError("Invalid combination of arguments") for host in sorted(hosts, key=utils.normalize_dnsname): - print host + if self.args.user: + print "%s@%s" % (self.args.user, host) + else: + print host + return 0 def parse_config_file(self): @@ -97,6 +101,10 @@ class Ohi(object): parser.add_argument('-t', '--host-type', action="store", help="Which host type to use") + parser.add_argument('-l', '--user', action='store', default=None, + help='username') + + self.args = parser.parse_args() |