diff --git a/lib/ansible/modules/network/nxos/nxos_user.py b/lib/ansible/modules/network/nxos/nxos_user.py index 9c8de1e62cd..8f7aa28830b 100644 --- a/lib/ansible/modules/network/nxos/nxos_user.py +++ b/lib/ansible/modules/network/nxos/nxos_user.py @@ -360,6 +360,7 @@ def main(): have_users = [x['name'] for x in have] for item in set(have_users).difference(want_users): if item != 'admin': + item = item.replace("\\", "\\\\") commands.append('no username %s' % item) result['commands'] = commands