{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/11500","labels_url":"https://api.github.com/repos/ansible/ansible/issues/11500/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/11500/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/11500/events","html_url":"https://github.com/ansible/ansible/issues/11500","id":93254402,"number":11500,"title":"ansible_sudo_pass doesn't work any more","user":{"login":"amenonsen","id":23628,"avatar_url":"https://avatars.githubusercontent.com/u/23628?v=3","gravatar_id":"","url":"https://api.github.com/users/amenonsen","html_url":"https://github.com/amenonsen","followers_url":"https://api.github.com/users/amenonsen/followers","following_url":"https://api.github.com/users/amenonsen/following{/other_user}","gists_url":"https://api.github.com/users/amenonsen/gists{/gist_id}","starred_url":"https://api.github.com/users/amenonsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amenonsen/subscriptions","organizations_url":"https://api.github.com/users/amenonsen/orgs","repos_url":"https://api.github.com/users/amenonsen/repos","events_url":"https://api.github.com/users/amenonsen/events{/privacy}","received_events_url":"https://api.github.com/users/amenonsen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P1","name":"P1","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/5","html_url":"https://github.com/ansible/ansible/milestones/v2","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/5/labels","id":975800,"number":5,"title":"v2","description":null,"creator":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"open_issues":77,"closed_issues":51,"state":"open","created_at":"2015-02-11T19:43:06Z","updated_at":"2015-07-06T17:50:21Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-07-06T11:19:09Z","updated_at":"2015-07-07T00:22:24Z","closed_at":"2015-07-06T17:50:21Z","body":"Issue Type:\r\n\r\nBug report\r\n\r\nAnsible Version:\r\n\r\n    $ ansible --version \r\n    ansible 2.0.0 (devel 2c9d1257ba) last updated 2015/07/06 16:34:30 (GMT +550)\r\n      lib/ansible/modules/core: (detached HEAD ff69ce7912) last updated 2015/07/03 09:43:55 (GMT +550)\r\n      lib/ansible/modules/extras: (detached HEAD 4e48ef9eca) last updated 2015/07/03 09:43:55 (GMT +550)\r\n      v1/ansible/modules/core: (detached HEAD f8d8af17cd) last updated 2015/06/09 18:30:45 (GMT +550)\r\n      v1/ansible/modules/extras: (detached HEAD 495ad450e5) last updated 2015/06/09 18:32:50 (GMT +550)\r\n\r\nAnsible Configuration:\r\n\r\nEmpty configuration file.\r\n\r\nEnvironment:\r\n\r\nDebian wheezy\r\n\r\nSummary:\r\n\r\nansible_sudo_pass doesn't work any more. If I set it in the inventory (either directly in the hosts file, or in host_vars/hostname.yml, or group_vars/all.yml), it is as if I haven't specified it at all. If I change it to ansible_become_pass instead, it works as expected.\r\n\r\nNote that the MAGIC_VARIABLE_MAPPING in lib/ansible/executor/connection.py mentions only ansible_sudo_password (and ansible_su_password) although the documentation mentions only ansible_sudo_pass and ansible_su_pass. In contrast, both ansible_become_password and ansible_become_pass are mentioned here. But adding ansible_sudo_pass as an alias does not fix the problem (or this would be a pull request). Nor does setting ansible_sudo_password in the inventory.\r\n\r\nSteps To Reproduce:\r\n\r\nhosts:\r\n\r\n    raven ansible_ssh_host=1.2.3.4 ansible_sudo_pass=xxx\r\n\r\nplaybook.yml:\r\n\r\n    - hosts: raven\r\n      tasks:\r\n        - name: Count lines in /etc/passwd\r\n          command: wc -l /etc/shadow\r\n          sudo: true\r\n\r\nInvocation:\r\n\r\n    ansible-playbook -i hosts playbook.yml\r\n\r\nExpected Results:\r\n\r\nThe sudo task succeeds:\r\n\r\n    changed: [raven] => {\"changed\": true, \"end\": \"2015-07-06 13:15:18.470655\", \"stdout\": \"52 /etc/shadow\", \"cmd\": [\"wc\", \"-l\", \"/etc/shadow\"], \"start\": \"2015-07-06 13:15:18.468512\", \"delta\": \"0:00:00.002143\", \"stderr\": \"\", \"rc\": 0, \"invocation\": {\"module_name\": \"command\", \"module_args\": {\"_raw_params\": \"wc -l /etc/shadow\"}}, \"stdout_lines\": [\"52 /etc/shadow\"], \"warnings\": []}\r\n\r\n(The above was obtained with ansible_become_pass set instead.)\r\n\r\nActual Results:\r\n\r\nThe sudo task does not succeed:\r\n\r\n    fatal: [raven]: FAILED! => {\"msg\": \"ERROR! Missing sudo password\", \"failed\": true}"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/119033611","html_url":"https://github.com/ansible/ansible/issues/11500#issuecomment-119033611","issue_url":"https://api.github.com/repos/ansible/ansible/issues/11500","id":119033611,"user":{"login":"amenonsen","id":23628,"avatar_url":"https://avatars.githubusercontent.com/u/23628?v=3","gravatar_id":"","url":"https://api.github.com/users/amenonsen","html_url":"https://github.com/amenonsen","followers_url":"https://api.github.com/users/amenonsen/followers","following_url":"https://api.github.com/users/amenonsen/following{/other_user}","gists_url":"https://api.github.com/users/amenonsen/gists{/gist_id}","starred_url":"https://api.github.com/users/amenonsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amenonsen/subscriptions","organizations_url":"https://api.github.com/users/amenonsen/orgs","repos_url":"https://api.github.com/users/amenonsen/repos","events_url":"https://api.github.com/users/amenonsen/events{/privacy}","received_events_url":"https://api.github.com/users/amenonsen/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T00:22:24Z","updated_at":"2015-07-07T00:22:24Z","body":"It is not resolved. As I noted in the original report: «But adding ansible_sudo_pass as an alias does not fix the problem (or this would be a pull request). Nor does setting ansible_sudo_password in the inventory.»"}}