diff options
Diffstat (limited to 'lib/ansible/modules/network/eos/eos_user.py')
-rw-r--r-- | lib/ansible/modules/network/eos/eos_user.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/modules/network/eos/eos_user.py b/lib/ansible/modules/network/eos/eos_user.py index 9bdec10838..be4b895000 100644 --- a/lib/ansible/modules/network/eos/eos_user.py +++ b/lib/ansible/modules/network/eos/eos_user.py @@ -174,8 +174,9 @@ def map_obj_to_commands(updates, module): for update in updates: want, have = update - needs_update = lambda x: want.get(x) and (want.get(x) != have.get(x)) - add = lambda x: commands.append('username %s %s' % (want['name'], x)) + def needs_update(x): return want.get(x) and (want.get(x) != have.get(x)) + + def add(x): return commands.append('username %s %s' % (want['name'], x)) if want['state'] == 'absent': commands.append('no username %s' % want['name']) |