mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
nxos_user: fails to remove usernames with embedded '\' (#53149)
Example: username ucs-DOMAIN\\x password 0 foo Found by `common/sanity` test.
This commit is contained in:
parent
495bd02dbf
commit
fd6e45bc75
1 changed files with 1 additions and 0 deletions
|
@ -360,6 +360,7 @@ def main():
|
||||||
have_users = [x['name'] for x in have]
|
have_users = [x['name'] for x in have]
|
||||||
for item in set(have_users).difference(want_users):
|
for item in set(have_users).difference(want_users):
|
||||||
if item != 'admin':
|
if item != 'admin':
|
||||||
|
item = item.replace("\\", "\\\\")
|
||||||
commands.append('no username %s' % item)
|
commands.append('no username %s' % item)
|
||||||
|
|
||||||
result['commands'] = commands
|
result['commands'] = commands
|
||||||
|
|
Loading…
Reference in a new issue