summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Sprygada <privateip@users.noreply.github.com>2016-08-26 21:39:00 -0400
committerGitHub <noreply@github.com>2016-08-26 21:39:00 -0400
commit13cfc911b4921a20f7bbfc0a1209e1f8232797a4 (patch)
treefacb5909b73b52d055a2959c7a82a9ea88640853
parentf33b232819a0b3a932f20e5f61961b661d70387f (diff)
parent9acf4ea4174878dd6d83aff0c132d621e325e360 (diff)
downloadansible-modules-core-13cfc911b4921a20f7bbfc0a1209e1f8232797a4.tar.gz
Merge pull request #4567 from privateip/ios_template
update ios_template module using refactored network shared modules
-rw-r--r--network/ios/ios_template.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/network/ios/ios_template.py b/network/ios/ios_template.py
index 94f0e808..06794682 100644
--- a/network/ios/ios_template.py
+++ b/network/ios/ios_template.py
@@ -148,16 +148,16 @@ def main():
contents = get_config(module)
if contents:
config = NetworkConfig(contents=contents, indent=1)
- result['_backup'] = contents
+ result['_backup'] = str(contents)
- commands = list()
if not module.params['force']:
- commands = dumps(candidate.difference(config), 'commands')
+ commands = candidate.difference(config)
+ commands = dumps(commands, 'commands').split('\n')
+ commands = [str(c) for c in commands if c]
else:
- commands = str(candidate)
+ commands = str(candidate).split('\n')
if commands:
- commands = commands.split('\n')
if not module.check_mode:
response = module.config(commands)
result['responses'] = response
@@ -169,4 +169,3 @@ def main():
if __name__ == '__main__':
main()
-