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
This commit is contained in:
Peter Sprygada 2016-09-07 19:56:27 -04:00 committed by Matt Clay
parent 8a87d7ff11
commit d6e16ded3f

View file

@ -119,8 +119,9 @@ from ansible.module_utils.ios import NetworkModule, NetworkError
def get_config(module): def get_config(module):
config = module.params['config'] or dict() config = module.params['config'] or dict()
defaults = module.params['include_defaults']
if not config and not module.params['force']: if not config and not module.params['force']:
config = module.config.get_config() config = module.config.get_config(include_defaults=defaults)
return config return config
def main(): def main():