mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Update manpages, fix missing variable assignment
This commit is contained in:
parent
f2465e0571
commit
c3cad50075
5 changed files with 41 additions and 8 deletions
|
@ -279,7 +279,7 @@ class SortedOptParser(optparse.OptionParser):
|
|||
self.option_list.sort(key=methodcaller('get_opt_string'))
|
||||
return optparse.OptionParser.format_help(self, formatter=None)
|
||||
|
||||
def base_parser(constants=C, usage="", output_opts=False, runas_opts=False, async_opts=False, connect_opts=False):
|
||||
def base_parser(constants=C, usage="", output_opts=False, port_opts=False, runas_opts=False, async_opts=False, connect_opts=False):
|
||||
''' create an options parser for any ansible script '''
|
||||
|
||||
parser = SortedOptParser(usage)
|
||||
|
@ -300,9 +300,11 @@ def base_parser(constants=C, usage="", output_opts=False, runas_opts=False, asyn
|
|||
parser.add_option('-T', '--timeout', default=constants.DEFAULT_TIMEOUT, type='int',
|
||||
dest='timeout',
|
||||
help="override the SSH timeout in seconds (default=%s)" % constants.DEFAULT_TIMEOUT)
|
||||
parser.add_option('-p', '--port', default=constants.DEFAULT_REMOTE_PORT, type='int',
|
||||
dest='remote_port',
|
||||
help="override the remote ssh port (default=%s)" % constants.DEFAULT_REMOTE_PORT)
|
||||
|
||||
if port_opts:
|
||||
parser.add_option('-p', '--port', default=constants.DEFAULT_REMOTE_PORT, type='int',
|
||||
dest='remote_port',
|
||||
help="override the remote ssh port (default=%s)" % constants.DEFAULT_REMOTE_PORT)
|
||||
|
||||
if output_opts:
|
||||
parser.add_option('-o', '--one-line', dest='one_line', action='store_true',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue