{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/11232","labels_url":"https://api.github.com/repos/ansible/ansible/issues/11232/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/11232/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/11232/events","html_url":"https://github.com/ansible/ansible/pull/11232","id":87193441,"number":11232,"title":"v2: Fixed logic when looking up become attribute","user":{"login":"ahamilton55","id":936174,"avatar_url":"https://avatars.githubusercontent.com/u/936174?v=3","gravatar_id":"","url":"https://api.github.com/users/ahamilton55","html_url":"https://github.com/ahamilton55","followers_url":"https://api.github.com/users/ahamilton55/followers","following_url":"https://api.github.com/users/ahamilton55/following{/other_user}","gists_url":"https://api.github.com/users/ahamilton55/gists{/gist_id}","starred_url":"https://api.github.com/users/ahamilton55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahamilton55/subscriptions","organizations_url":"https://api.github.com/users/ahamilton55/orgs","repos_url":"https://api.github.com/users/ahamilton55/repos","events_url":"https://api.github.com/users/ahamilton55/events{/privacy}","received_events_url":"https://api.github.com/users/ahamilton55/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bugfix_pull_request","name":"bugfix_pull_request","color":"ded270"},{"url":"https://api.github.com/repos/ansible/ansible/labels/needs_revision","name":"needs_revision","color":"eb6450"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P3","name":"P3","color":"fef2c0"}],"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":37,"closed_issues":33,"state":"open","created_at":"2015-02-11T19:43:06Z","updated_at":"2015-06-25T00:58:39Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-06-11T03:17:14Z","updated_at":"2015-06-25T00:58:48Z","closed_at":"2015-06-25T00:58:39Z","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/11232","html_url":"https://github.com/ansible/ansible/pull/11232","diff_url":"https://github.com/ansible/ansible/pull/11232.diff","patch_url":"https://github.com/ansible/ansible/pull/11232.patch"},"body":"##### Issue Type:\r\n\r\nBugfix Pull Request\r\n\r\n##### Ansible Version:\r\n\r\n```bash\r\n± % ansible --version                                                                                                                ?[0] !10244\r\nansible 2.0.0 (detached HEAD fix_task_l) last updated 2015/06/10 20:09:17 (GMT -700)\r\n  lib/ansible/modules/core: (detached HEAD d6ed6113a7) last updated 2015/06/09 17:48:20 (GMT -700)\r\n  lib/ansible/modules/extras: (detached HEAD 57813a2e74) last updated 2015/06/09 17:48:20 (GMT -700)\r\n  v1/ansible/modules/core: (detached HEAD f8d8af17cd) last updated 2015/06/09 16:52:46 (GMT -700)\r\n  v1/ansible/modules/extras: (detached HEAD 495ad450e5) last updated 2015/06/09 16:52:49 (GMT -700)\r\n  configured module search path = /Users/andrew/workspace/ops/deploy/modules/\r\n```\r\n\r\n##### Ansible Configuration:\r\n\r\nNothing has changed in my configuration since this broke with the v2 code.\r\n\r\n##### Environment:\r\n\r\nOS X 10.10.3\r\npython 2.7.6\r\n\r\n##### Summary:\r\n\r\nCurrently when trying to change the `become` value from a global `yes` to a task level `no` does not work.\r\n\r\n##### Steps To Reproduce:\r\n\r\nThe following playbook is able to reproduce this for me.\r\n\r\n```yaml\r\n---\r\n- hosts: localhost\r\n  connection: local\r\n  become: yes\r\n  gather_facts: no\r\n  tasks:\r\n      - local_action: command ls -ail\r\n        become: no\r\n```\r\n\r\n##### Expected Results:\r\n\r\n```text\r\n % EC2_REGION=us-west-1 ansible-playbook -i deploy_conf/localhost test.yml\r\n\r\nPLAY: ***************************************************************************\r\n\r\nTASK [command] ******************************************************************\r\nchanged: [localhost]\r\n\r\nPLAY RECAP **********************************************************************\r\nlocalhost                  : ok=1    changed=1    unreachable=0    failed=0\r\n```\r\n\r\n##### Actual Results:\r\n\r\n```text\r\n± % EC2_REGION=us-west-1 ansible-playbook -i deploy_conf/localhost test.yml\r\n\r\nPLAY: ***************************************************************************\r\n\r\nTASK [command] ******************************************************************\r\nfatal: [localhost]: FAILED! => {\"msg\": \"[sudo via ansible, key=dhylsnsegwlyqivsftvkpiaouxvvdpfa] password: \\n\", \"failed\": true, \"changed\": false, \"parsed\": false, \"invocation\": {\"module_name\": \"command\", \"module_args\": {\"_raw_params\": \"ls -ail\"}}}\r\n\r\nNO MORE HOSTS LEFT **************************************************************\r\n\r\nPLAY RECAP **********************************************************************\r\nlocalhost                  : ok=0    changed=0    unreachable=0    failed=1\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/115058584","html_url":"https://github.com/ansible/ansible/pull/11232#issuecomment-115058584","issue_url":"https://api.github.com/repos/ansible/ansible/issues/11232","id":115058584,"user":{"login":"jimi-c","id":26403,"avatar_url":"https://avatars.githubusercontent.com/u/26403?v=3","gravatar_id":"","url":"https://api.github.com/users/jimi-c","html_url":"https://github.com/jimi-c","followers_url":"https://api.github.com/users/jimi-c/followers","following_url":"https://api.github.com/users/jimi-c/following{/other_user}","gists_url":"https://api.github.com/users/jimi-c/gists{/gist_id}","starred_url":"https://api.github.com/users/jimi-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimi-c/subscriptions","organizations_url":"https://api.github.com/users/jimi-c/orgs","repos_url":"https://api.github.com/users/jimi-c/repos","events_url":"https://api.github.com/users/jimi-c/events{/privacy}","received_events_url":"https://api.github.com/users/jimi-c/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T00:58:48Z","updated_at":"2015-06-25T00:58:48Z","body":"@ahamilton55 thanks, I've merged my fix in and closed this."}}