mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-27 03:59:05 +02:00
Fix date removal in nonverbose config (#262)
* Fix date removal in nonverbose config As in newer versions of RouterOS the date format is 2024-10-02 and no longer 2024/10/02, the regex did no longer match all cases. This is fixed. * Add changelog fragment
This commit is contained in:
parent
10fbc564a7
commit
232a013c64
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/262-fix-date-removal.yml
Normal file
2
changelogs/fragments/262-fix-date-removal.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- facts - fix date not getting removed for idempotent config export (https://github.com/ansible-collections/community.routeros/pull/262).
|
|
@ -311,7 +311,7 @@ class Config(FactsBase):
|
||||||
'/export',
|
'/export',
|
||||||
]
|
]
|
||||||
|
|
||||||
RM_DATE_RE = re.compile(r'^# [a-z0-9/][a-z0-9/]* [0-9:]* by RouterOS')
|
RM_DATE_RE = re.compile(r'^# [a-z0-9/-][a-z0-9/-]* [0-9:]* by RouterOS')
|
||||||
|
|
||||||
def populate(self):
|
def populate(self):
|
||||||
super(Config, self).populate()
|
super(Config, self).populate()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue