multiple nxos fixes (#32905)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
8b19c1c02d
commit
545bd41927
3 changed files with 9 additions and 9 deletions
|
@ -162,7 +162,7 @@ class Cli:
|
|||
except ValueError:
|
||||
out = to_text(out, errors='surrogate_then_replace').strip()
|
||||
|
||||
if item['output'] == 'json' and out != 'ok' and isinstance(out, string_types):
|
||||
if item['output'] == 'json' and out != '' and isinstance(out, string_types):
|
||||
self._module.fail_json(msg='failed to retrieve output of %s in json format' % item['command'])
|
||||
|
||||
responses.append(out)
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
local_file: "./nxos.yaml"
|
||||
file_system: "bootflash:"
|
||||
provider: "{{ cli }}"
|
||||
username: "{{ nxos_cli_user | default('admin') }}"
|
||||
password: "{{ nxos_cli_pass | default('admin') }}"
|
||||
username: "{{ ansible_ssh_user }}"
|
||||
password: "{{ ansible_ssh_pass }}"
|
||||
host: "{{ ansible_host }}"
|
||||
register: result
|
||||
|
||||
|
@ -48,8 +48,8 @@
|
|||
remote_file: "nxos.yaml"
|
||||
file_system: "bootflash:"
|
||||
provider: "{{ cli }}"
|
||||
username: "{{ nxos_cli_user | default('admin') }}"
|
||||
password: "{{ nxos_cli_pass | default('admin') }}"
|
||||
username: "{{ ansible_ssh_user }}"
|
||||
password: "{{ ansible_ssh_pass }}"
|
||||
host: "{{ ansible_host }}"
|
||||
register: result
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
local_file: "./nxos.yaml"
|
||||
file_system: "bootflash:"
|
||||
provider: "{{ nxapi }}"
|
||||
username: "{{ nxos_nxapi_user | default('admin') }}"
|
||||
password: "{{ nxos_nxapi_pass | default('admin') }}"
|
||||
username: "{{ ansible_ssh_user }}"
|
||||
password: "{{ ansible_ssh_pass }}"
|
||||
host: "{{ ansible_host }}"
|
||||
register: result
|
||||
|
||||
|
@ -51,8 +51,8 @@
|
|||
remote_file: "nxos.yaml"
|
||||
file_system: "bootflash:"
|
||||
provider: "{{ nxapi }}"
|
||||
username: "{{ nxos_nxapi_user | default('admin') }}"
|
||||
password: "{{ nxos_nxapi_pass | default('admin') }}"
|
||||
username: "{{ ansible_ssh_user }}"
|
||||
password: "{{ ansible_ssh_pass }}"
|
||||
host: "{{ ansible_host }}"
|
||||
register: result
|
||||
|
||||
|
|
Loading…
Reference in a new issue