multiple nxos fixes (#32905)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2017-11-14 15:23:49 +00:00 committed by GitHub
parent 8b19c1c02d
commit 545bd41927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

@ -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)

View file

@ -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

View file

@ -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