Getting this traceback:
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 165, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 73, in main
options.ask_pass = options.ask_pass or C.DEFAULT_ASK_PASS
AttributeError: 'module' object has no attribute 'DEFAULT_ASK_PASS'
with this config:
[defaults]
hostfile = ~/.ansible.hosts
ask_sudo_pass=True
with latest master.
Any idea what's up?
Thanks.
There's no branch 'master', which may be part of the problem
ansible --version?
There's no branch 'master', which may be part of the problem
ansible --version?
0.9.
Sorry, latest on the devel branch.
Any word on this? Has anyone managed to duplicate it? What additional information might I provide? It's still happening for me in the latest devel checkout, after running 'make deb' and installing the package.
I've looked, and I'm uncertain as to why DEFAULT_ASK_PASS is being pulled off of 'module' when even the crashing line in question references C.
This is under Ubuntu 12.10 and Python 2.7.
Thanks.
I tried to reproduce this, but was unable. C is a config construct holding all the constants DEFAULT_ASK_PASS is a constant that is present so I’m not sure why it is producing this traceback.
C is also a module instance.
I suspect you have some weird installation with some leftover
artifacts around or something like that.
I just dpkg --purged my ansible package, did a fresh checkout, built then re-installed the package. Same result.
Thoughts on what else to try?
OK, figured this out. There was indeed an install of Ansible hiding in my ~/.local directory, which I don't even remember having made. It's been about a decade since I did anything with Python so it took me a while to track this down.
One of my debugging steps involved running Ansible from source, but it failed there too. From that I concluded that there must be some bug in the version as shipped. I wonder if the binaries in the source tree might be configured to put the source directories first on PYTHONPATH? Had it worked from source but failed from my packaged versions, I would have poked my system more aggressively and wouldn't have bothered the list.
Thanks, and sorry for the noise.