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

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.
This commit is contained in:
Sam Doran 2018-03-08 14:36:32 -05:00 committed by GitHub
parent 8f2c87231f
commit 3134ba6bee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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:

View file

@ -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