Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios_banner: KeyError: 'text' on state: absent #23308

Closed
gundalow opened this issue Apr 5, 2017 · 1 comment
Closed

ios_banner: KeyError: 'text' on state: absent #23308

gundalow opened this issue Apr 5, 2017 · 1 comment
Assignees
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. cisco Cisco technologies ios Cisco IOS community module This issue/PR relates to a module. networking Network category
Milestone

Comments

@gundalow
Copy link
Contributor

gundalow commented Apr 5, 2017

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ios_banner

ANSIBLE VERSION
johnb@x260:~/git/ansible-inc/ansible-workspace-2/test/integration (devel)$ ansible --version
ansible 2.4.0 (devel d890167575) last updated 2017/04/05 17:20:37 (GMT +100)
  config file = 
  configured module search path = [u'/home/johnb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/johnb/git/ansible-inc/ansible-workspace-2/lib/ansible
  executable location = /home/johnb/git/ansible-inc/ansible-workspace-2/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

SUMMARY
STEPS TO REPRODUCE
time ANSIBLE_PARAMIKO_LOOK_FOR_KEYS=False ANSIBLE_ROLES_PATH=targets  ansible-playbook -vvvvv  -i  inventory.network-jobarker  ios.yaml -u cisco -k
EXPECTED RESULTS
ACTUAL RESULTS
TASK [ios_banner : remove login (idempotent)] ****************************************************************************************************************************************************************************************************
task path: /home/johnb/git/ansible-inc/ansible-workspace-2/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml:28
Using module file /home/johnb/git/ansible-inc/ansible-workspace-2/lib/ansible/modules/network/ios/ios_banner.py
<ios01> ESTABLISH LOCAL CONNECTION FOR USER: johnb
<ios01> EXEC /bin/sh -c 'echo ~ && sleep 0'
<ios01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/johnb/.ansible/tmp/ansible-tmp-1491409268.8-277228905646339 `" && echo ansible-tmp-1491409268.8-277228905646339="` echo /home/johnb/.ansible/tmp/ansible-tmp-1491409268.8-277228905646339 `" ) && sleep 0'
<ios01> PUT /tmp/tmpIkAI8j TO /home/johnb/.ansible/tmp/ansible-tmp-1491409268.8-277228905646339/ios_banner.py
<ios01> EXEC /bin/sh -c 'chmod u+x /home/johnb/.ansible/tmp/ansible-tmp-1491409268.8-277228905646339/ /home/johnb/.ansible/tmp/ansible-tmp-1491409268.8-277228905646339/ios_banner.py && sleep 0'
<ios01> EXEC /bin/sh -c 'python /home/johnb/.ansible/tmp/ansible-tmp-1491409268.8-277228905646339/ios_banner.py; rm -rf "/home/johnb/.ansible/tmp/ansible-tmp-1491409268.8-277228905646339/" > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_Xjd4_i/ansible_module_ios_banner.py", line 175, in <module>
    main()
  File "/tmp/ansible_Xjd4_i/ansible_module_ios_banner.py", line 163, in main
    commands = map_obj_to_commands((want, have), module)
  File "/tmp/ansible_Xjd4_i/ansible_module_ios_banner.py", line 95, in map_obj_to_commands
    if state == 'absent' and have['text']:
KeyError: 'text'

fatal: [ios01]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_Xjd4_i/ansible_module_ios_banner.py\", line 175, in <module>\n    main()\n  File \"/tmp/ansible_Xjd4_i/ansible_module_ios_banner.py\", line 163, in main\n    commands = map_obj_to_commands((want, have), module)\n  File \"/tmp/ansible_Xjd4_i/ansible_module_ios_banner.py\", line 95, in map_obj_to_commands\n    if state == 'absent' and have['text']:\nKeyError: 'text'\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}
@gundalow gundalow added bug_report networking Network category labels Apr 5, 2017
@gundalow gundalow added this to the 2.3.0 milestone Apr 5, 2017
@ansibot
Copy link
Contributor

ansibot commented Apr 5, 2017

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 module This issue/PR relates to a module. labels Apr 5, 2017
@gundalow gundalow changed the title eos_banner: KeyError: 'text' on state: absent ios_banner: KeyError: 'text' on state: absent Apr 5, 2017
calfonso added a commit to calfonso/ansible that referenced this issue Apr 5, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@dagwieers dagwieers added ios Cisco IOS community cisco Cisco technologies labels Feb 23, 2019
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. cisco Cisco technologies ios Cisco IOS community module This issue/PR relates to a module. networking Network category
Projects
None yet
Development

No branches or pull requests

5 participants