Do not try to add an entry if none exist (#37152) (#37213)

When commit revisions are disabled, there will be no revision items returned.
Add note about setting ANSIBLE_PERSISTENT_COMMAND_TIMEOUT to a higer value to avoid timeouts.

(cherry picked from commit 3134ba6bee)
pull/37228/head
Sam Doran 7 years ago committed by Matt Davis
parent acef6d25b1
commit e02b237649

@ -0,0 +1,2 @@
bugfixes:
- edgeos_facts - fix error when there are no commit revisions (https://github.com/ansible/ansible/issues/37123)

@ -27,6 +27,9 @@ description:
in the device configuration.
notes:
- Tested against EdgeOS 1.9.7
- Setting C(ANSIBLE_PERSISTENT_COMMAND_TIMEOUT) to 30 is recommended since
the save command can take longer than the default of 10 seconds on
some EdgeOS hardware.
options:
lines:
description:

@ -170,7 +170,7 @@ class Config(FactsBase):
by=str(match.group(3)).strip(),
via=str(match.group(4)).strip(),
comment=None)
else:
elif entry:
entry['comment'] = line.strip()
self.facts['commits'] = entries

Loading…
Cancel
Save