diff options
author | Peter Sprygada <psprygada@ansible.com> | 2016-09-07 14:26:10 -0400 |
---|---|---|
committer | Peter Sprygada <psprygada@ansible.com> | 2016-09-07 14:26:10 -0400 |
commit | 675e87f68d824a8c183a92a7d28ae4284de6c9d1 (patch) | |
tree | 576fb806aa1d79ba4da53b3e0a833b6b426c3330 | |
parent | d67af04c45b8cfc4e7e19cf2d2af2f980db88e7d (diff) | |
download | ansible-675e87f68d824a8c183a92a7d28ae4284de6c9d1.tar.gz |
minor fix in eos shared module returning diff
The diff returned from eos when the transport was set to eapi was as
a dict but is expected to be a str. This change extracts the diff string
from the dict object and returns it. The behavior is now consistent
between cli and eapi transports.
-rw-r--r-- | lib/ansible/module_utils/eos.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/eos.py b/lib/ansible/module_utils/eos.py index dea26bad95..2f551b13ab 100644 --- a/lib/ansible/module_utils/eos.py +++ b/lib/ansible/module_utils/eos.py @@ -91,6 +91,7 @@ class EosConfigMixin(object): self.abort_config(session) diff = None raise + return diff def save_config(self): @@ -103,9 +104,12 @@ class EosConfigMixin(object): if isinstance(self, Eapi): response = self.execute(commands, output='text') + response[-2] = response[-2].get('output').strip() else: response = self.execute(commands) + + return response[-2] def commit_config(self, session): |