{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3260","repository_url":"https://api.github.com/repos/ansible/ansible-modules-extras","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3260/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3260/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3260/events","html_url":"https://github.com/ansible/ansible-modules-extras/issues/3260","id":184427754,"number":3260,"title":"Make authorize in ASA more user friendly","user":{"login":"ogenstad","id":6694669,"avatar_url":"https://avatars.githubusercontent.com/u/6694669?v=3","gravatar_id":"","url":"https://api.github.com/users/ogenstad","html_url":"https://github.com/ogenstad","followers_url":"https://api.github.com/users/ogenstad/followers","following_url":"https://api.github.com/users/ogenstad/following{/other_user}","gists_url":"https://api.github.com/users/ogenstad/gists{/gist_id}","starred_url":"https://api.github.com/users/ogenstad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogenstad/subscriptions","organizations_url":"https://api.github.com/users/ogenstad/orgs","repos_url":"https://api.github.com/users/ogenstad/repos","events_url":"https://api.github.com/users/ogenstad/events{/privacy}","received_events_url":"https://api.github.com/users/ogenstad/received_events","type":"User","site_admin":false},"labels":[{"id":454885841,"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":132898023,"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":265304236,"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/networking","name":"networking","color":"c7def8","default":false},{"id":415779102,"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-21T08:28:39Z","updated_at":"2016-12-12T20:55:22Z","closed_at":"2016-12-12T20:55:22Z","body":"Saw this a few days ago. I hope to find time to fix it, but haven't yet.\n##### ISSUE TYPE\n- Bug Report\n- Feature Idea\n##### COMPONENT NAME\n- asa_acl\n- asa_config\n- asa_command\n##### ANSIBLE VERSION\n\n```\n$ ansible --version\nansible 2.3.0 (devel 38d0f77a0f) last updated 2016/10/18 18:39:48 (GMT +200)\n  lib/ansible/modules/core: (devel ecc4029753) last updated 2016/10/18 18:41:14 (GMT +200)\n  lib/ansible/modules/extras: (devel 3f77bb6857) last updated 2016/10/18 18:41:28 (GMT +200)\n  config file = /Users/patrick/src/tests/ansible-asa/ansible.cfg\n  configured module search path = Default w/o overrides\n```\n##### CONFIGURATION\n\nN/A\n##### OS / ENVIRONMENT\n\nN/A\n##### SUMMARY\n\nUnlike Cisco IOS the Cisco ASA cli doesn't ignore the `enable` command if the user already is in enable mode.\n\n```\nns2903-asa-02# enable\n                ^\nERROR: % Invalid input detected at '^' marker.\nns2903-asa-02#\n```\n##### STEPS TO REPRODUCE\n\nCode in ASA\n\n```\naaa authentication ssh console LOCAL\naaa authentication enable console LOCAL\naaa authorization exec LOCAL auto-enable\nusername cisco password 3USUcOPFUiMCO4Jk encrypted privilege 15\n```\n\nPlaybook:\n\n```\n\n---\n-  hosts: firewall\n   connection: local\n   gather_facts: false\n\n   tasks:\n     - name: Show version\n       asa_command:\n         host: \"{{ inventory_hostname }}\"\n         auth_pass: cisco\n         username: cisco\n         password: cisco\n         authorize: yes\n         commands:\n           - show run\n```\n##### EXPECTED RESULTS\n\nIt would be more userfriendly if [asa.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/asa.py) either looked at the prompt first and didn't run `enable` if the prompt ended with `#` instead of `>`, another option would be to ignore the warning when this command was issued.\n##### ACTUAL RESULTS\n\n```\n$ ansible-playbook -i hosts asa-sanity.yml\n\nPLAY [firewall] ****************************************************************\n\nTASK [Show version] ************************************************************\nfatal: [172.29.50.2]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"matched error in response: enable\\r\\n                ^\\r\\nERROR: % Invalid input detected at '^' marker.\\r\\n\"}\n```\n"}}
{"actor":{"display_login":"privateip"}}