Using /home/albert/ansible/ansible.cfg as config file
1 plays in 11381.yml
PLAY ****************************************************************************
TASK [command] ******************************************************************
changed: [antest] => {"changed": true, "cmd": ["whoami"], "delta": "0:00:01.003433", "end": "2015-07-21 09:50:32.955368", "rc": 0, "start": "2015-07-21 09:50:31.95193
5", "stderr": "", "stdout": "my_user", "stdout_lines": ["my_user"], "warnings": []}
PLAY RECAP **********************************************************************
antest : ok=1 changed=1 unreachable=0 failed=0
It still sets 'become: yes'
However there's this workaround:
$ cat 11381-2.yml
---
- hosts: antest
gather_facts: no
tasks:
- command: whoami
become: "{{ app_become | default('False') | bool }}"
become_user: my_user
$ ansible-playbook 11381.yml -vv -e app_become=false
Using /home/albert/ansible/ansible.cfg as config file
1 plays in 11381.yml
PLAY ****************************************************************************
TASK [command] ******************************************************************
changed: [antest] => {"changed": true, "cmd": ["whoami"], "delta": "0:00:00.002272", "end": "2015-07-21 09:55:17.910846", "rc": 0, "start": "2015-07-21 09:55:17.90857
4", "stderr": "", "stdout": "root", "stdout_lines": ["root"], "warnings": []}
PLAY RECAP **********************************************************************
antest : ok=1 changed=1 unreachable=0 failed=0