Get AttributeError: Values instance has no attribute 'su' on ansible == 3260e69

I get error when try to use ansible from devel:

$ ansible-playbook -i inventories/production/local.ini provisioning/ru-appservers.yml --tag configuration --check -vvvv
Traceback (most recent call last):
File “/home/srk/envs/madmin/bin/ansible-playbook”, line 10, in
execfile(file)
File “/home/srk/workspace/ansible/bin/ansible-playbook”, line 283, in
sys.exit(main(sys.argv[1:]))
File “/home/srk/workspace/ansible/bin/ansible-playbook”, line 87, in main
if (options.su or options.su_user or options.ask_su_pass) and
AttributeError: Values instance has no attribute ‘su’

Hi Rinat,

Looks like ansible-playbook is importing an older, unpatched version of the base_parser. Running from devel with su, I’m not having this problem.

Attempt to fetch the latest version of the library and try again.

09:18 $ ansible-playbook --su --ask-su-pass -vv mine-local/test-su.yml -i mine-local/staging
su password:

PLAY [Test su connecting as root] *********************************************

TASK: [Test connecting as root] ***********************************************
REMOTE_MODULE command /usr/bin/whoami
REMOTE_MODULE command /usr/bin/whoami
changed: [two] => {“changed”: true, “cmd”: [“/usr/bin/whoami”], “delta”: “0:00:00.006269”, “end”: “2014-02-06 15:15:37.010804”, “rc”: 0, “start”: “2014-02-06 15:15:37.004535”, “stderr”: “”, “stdout”: “root”}
changed: [one] => {“changed”: true, “cmd”: [“/usr/bin/whoami”], “delta”: “0:00:00.005842”, “end”: “2014-02-06 15:15:44.060290”, “rc”: 0, “start”: “2014-02-06 15:15:44.054448”, “stderr”: “”, “stdout”: “root”}

PLAY RECAP ********************************************************************
one : ok=1 changed=1 unreachable=0 failed=0

two : ok=1 changed=1 unreachable=0 failed=0