mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
Use regex variable in eos_user.py (#23797)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
91644167c9
commit
527a7762e1
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@ def map_config_to_obj(module):
|
||||||
|
|
||||||
for user in set(match):
|
for user in set(match):
|
||||||
regex = r'username %s .+$' % user
|
regex = r'username %s .+$' % user
|
||||||
cfg = re.findall(r'username %s .+$' % user, data, re.M)
|
cfg = re.findall(regex, data, re.M)
|
||||||
cfg = '\n'.join(cfg)
|
cfg = '\n'.join(cfg)
|
||||||
obj = {
|
obj = {
|
||||||
'username': user,
|
'username': user,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue