mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
Fix eos_config defaults logic (#26798)
Current code is bogus, it was passing flags all unconditionally.
This commit is contained in:
parent
d4482761ba
commit
8333a8b908
1 changed files with 4 additions and 2 deletions
|
@ -288,10 +288,12 @@ def get_candidate(module):
|
||||||
def get_running_config(module, config=None):
|
def get_running_config(module, config=None):
|
||||||
contents = module.params['running_config']
|
contents = module.params['running_config']
|
||||||
if not contents:
|
if not contents:
|
||||||
if not module.params['defaults'] and config:
|
if config:
|
||||||
contents = config
|
contents = config
|
||||||
else:
|
else:
|
||||||
flags = ['all']
|
flags = []
|
||||||
|
if module.params['defaults']:
|
||||||
|
flags.append('all')
|
||||||
contents = get_config(module, flags=flags)
|
contents = get_config(module, flags=flags)
|
||||||
return NetworkConfig(indent=3, contents=contents)
|
return NetworkConfig(indent=3, contents=contents)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue