From 8f4bc8150f227b408cd609bb3544a2a7acb6b54f Mon Sep 17 00:00:00 2001 From: Mike Wiebe Date: Wed, 16 Aug 2017 11:38:38 -0400 Subject: [PATCH] Fix default nxapi port setting when use_ssl set (#28236) * Fix port setting when use_ssl set --- lib/ansible/plugins/action/nxos.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/nxos.py b/lib/ansible/plugins/action/nxos.py index dbc9f449dd..e8e2d36057 100644 --- a/lib/ansible/plugins/action/nxos.py +++ b/lib/ansible/plugins/action/nxos.py @@ -93,7 +93,10 @@ class ActionModule(_ActionModule): provider['host'] = self._play_context.remote_addr if provider.get('port') is None: - provider['port'] = 80 + if provider.get('use_ssl'): + provider['port'] = 443 + else: + provider['port'] = 80 if provider.get('timeout') is None: provider['timeout'] = self._play_context.timeout