Cannot get Ansible 1.3.1 to work

Hi, I have successfully upgraded from 1.2 to 1.3.1. I did this for another computer but it fails. Previously, it can run Ansible 1.2.

This is the error that I got after upgrading to 1.3.1:
Traceback (most recent call last):
File “/usr/local/bin/ansible-playbook”, line 268, in
sys.exit(main(sys.argv[1:]))
File “/usr/local/bin/ansible-playbook”, line 158, in main
diff=options.diff
File “/usr/local/lib64/python2.6/site-packages/ansible/playbook/init.py”, line 144, in init
if self.inventory.src() is not None:
AttributeError: ‘Inventory’ object has no attribute ‘src’

Can you help me with this? Thank you.

How did you install ansible and what is your operating system?

Hi,

I downloaded the tar version ansible-1.3.1.tar.gz. i installed in using “sudo python setup.py install”

I am running Suse Linux Enterprise Server 11 SP1 (x86x64)
Linux version 2.6.32.12-0.7-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (Suse Linux) ) #1 SMP

When i run “sudo python setup.py install”, the first line has this warning:
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: ‘install_requires’ warning.warn(msg)

The installation proceeds normally after this warning.

I have already installed distribute-0.6.45 on my machine.

Can this warning be the cause?

Sounds like you have your install environment polluted with some code from previous versions.

distribute has no bearing here, we don’t use it, we’re using the standard setuptools.

It may be an issue with your version of Python.

Hi Michael,

May I ask how do I wipe out environment from previous installs so that I can start from scratch?

You should have a site-packages (or maybe dist-packages?) directory in your python library directory, which should contain the ansible directory. Remove that directory and all of its contents and re-install.

Thanks James, it’s working well now :slight_smile:

Thanks Michael for the useful hint :slight_smile: