From d6e16ded3fe8bc5670d6048c694bbfdbd9d7bcc7 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Wed, 7 Sep 2016 19:56:27 -0400 Subject: [PATCH] fix bug in ios_template when include_defaults is set to true Module was ignoring include_defaults argument. This fixes the issue such that the correct configuration is returned --- lib/ansible/modules/network/ios/ios_template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/ios/ios_template.py b/lib/ansible/modules/network/ios/ios_template.py index 067946829a7..52e82f26e3f 100644 --- a/lib/ansible/modules/network/ios/ios_template.py +++ b/lib/ansible/modules/network/ios/ios_template.py @@ -119,8 +119,9 @@ from ansible.module_utils.ios import NetworkModule, NetworkError def get_config(module): config = module.params['config'] or dict() + defaults = module.params['include_defaults'] if not config and not module.params['force']: - config = module.config.get_config() + config = module.config.get_config(include_defaults=defaults) return config def main():