1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Check text key exists on eos_banner absent case (#23319)

This can fail if we don't check the key exists.
This commit is contained in:
Ricardo Carrillo Cruz 2017-04-05 21:07:18 +02:00 committed by GitHub
parent 4571ff0b52
commit b9b4e68206

View file

@ -95,7 +95,7 @@ def map_obj_to_commands(updates, module):
want, have = updates
state = module.params['state']
if state == 'absent' and have['text']:
if state == 'absent' and 'text' in have.keys() and have['text']:
commands.append('no banner %s' % module.params['banner'])
elif state == 'present':