Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23363)
This commit is contained in:
parent
990ba90380
commit
394cb3477b
2 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,8 @@ def map_config_to_obj(module):
|
||||||
else:
|
else:
|
||||||
# On EAPI we need to extract the banner text from dict key
|
# On EAPI we need to extract the banner text from dict key
|
||||||
# 'loginBanner'
|
# 'loginBanner'
|
||||||
obj['text'] = output[0]['loginBanner'].strip('\n')
|
if isinstance(output[0], dict) and 'loginBanner' in output[0].keys():
|
||||||
|
obj['text'] = output[0]['loginBanner'].strip('\n')
|
||||||
obj['state'] = 'present'
|
obj['state'] = 'present'
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,5 @@ eapi:
|
||||||
password: "{{ eos_eapi_pass | default('admin') }}"
|
password: "{{ eos_eapi_pass | default('admin') }}"
|
||||||
transport: eapi
|
transport: eapi
|
||||||
use_ssl: no
|
use_ssl: no
|
||||||
|
port: 80
|
||||||
authorize: yes
|
authorize: yes
|
||||||
|
|
Loading…
Reference in a new issue