mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix fetching ios default running config (#39475)
If default option is enable in that case only add 'all' or 'full' flag
This commit is contained in:
parent
9577cef3ba
commit
eb5e15e7e0
1 changed files with 5 additions and 3 deletions
|
@ -56,12 +56,14 @@ class Cliconf(CliconfBase):
|
|||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
|
||||
if not flags:
|
||||
flags = []
|
||||
|
||||
if source == 'running':
|
||||
cmd = 'show running-config '
|
||||
if not flags:
|
||||
flags = ['all']
|
||||
else:
|
||||
cmd = 'show startup-config'
|
||||
cmd = 'show startup-config '
|
||||
|
||||
cmd += ' '.join(to_list(flags))
|
||||
cmd = cmd.strip()
|
||||
|
|
Loading…
Reference in a new issue