mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Expose remote_port option in playbook
This commit is contained in:
@@ -75,6 +75,7 @@ class Cli(object):
|
||||
dest='remote_user', help='connect as this user')
|
||||
parser.add_option('-p', '--port', default=C.DEFAULT_REMOTE_PORT, type='int',
|
||||
dest='remote_port', help='set the remote ssh port')
|
||||
|
||||
options, args = parser.parse_args()
|
||||
self.callbacks.options = options
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ def main(args):
|
||||
help="path to module library", default=C.DEFAULT_MODULE_PATH)
|
||||
parser.add_option('-O', '--override-hosts', dest="override_hosts", default=None,
|
||||
help="run playbook against these hosts regardless of inventory settings")
|
||||
parser.add_option('-p', '--port', default=C.DEFAULT_REMOTE_PORT, type='int',
|
||||
dest='remote_port', help='set the remote ssh port')
|
||||
|
||||
parser.add_option('-T', '--timeout', default=C.DEFAULT_TIMEOUT, type='int',
|
||||
dest='timeout', help="set the SSH timeout in seconds")
|
||||
|
||||
@@ -73,6 +76,7 @@ def main(args):
|
||||
forks=options.forks,
|
||||
verbose=True,
|
||||
remote_pass=sshpass,
|
||||
remote_port=options.remote_port,
|
||||
callbacks=playbook_cb,
|
||||
runner_callbacks=runner_cb,
|
||||
stats=stats,
|
||||
|
||||
Reference in New Issue
Block a user