From 1733bf4053b1ee299f06c16c9d167bd0a15ecc1a Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Sun, 31 Jan 2016 22:58:08 -0500 Subject: [PATCH] minor update for nxos This fixes a minor bug in the nxos config module to ensure that both the cli and nxapi transport return the running config as a string and not a list object. --- lib/ansible/module_utils/nxos.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index c2d49c9002..3c8837e096 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -203,10 +203,8 @@ class NetworkModule(AnsibleModule): if self.params.get('include_defaults'): cmd += ' all' - if self.params['transport'] == 'cli': - return self.execute(cmd)[0] - else: - return self.execute(cmd) + response = self.execute(cmd) + return response[0] def get_module(**kwargs): """Return instance of NetworkModule