Installation of 2.0

I am in need of assistance in upgrading Ansible to version 2.0. Every time I attempt to install I get the 1.7.2 version. I have about 10 windows vm machines that I am looking to manage with the Ansible application and it is my understanding that 2.0 is more friendly to windows then previous version. Any help you can offer would be greatly appreciated. I have attached a screen shot of the version number.

Thank you

Have you tried to install it via pip?

No only via get-apt and PPA, I will try it via PIP

You can install from source code.

$ sudo apt-get remove ansible $ sudo apt-get install asciidoc make debhelper cdbs devscripts $ git clone --recursive --branch v2.0.2.0-1 https://github.com/ansible/ansible.git $ cd ansible && make deb $ sudo dpkg -i deb-build/unstable/*.deb

The PPA is for Ubuntu and not Debian that you use.

can you tell me what this installing here?
sudo apt-get install asciidoc make debhelper cdbs devscripts

it is taking forever to do it looks like a lot of files…

I am getting an error at this part…

Problem fixed.
Thanks.

This packages required for compiling. Without these packages you will get error like this:

dpkg-checkbuilddeps: Unmet build dependencies: cdbs debhelper (>= 5.0.0) dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: warning: (Use -d flag to override.) debuild: fatal error at line 1364: dpkg-buildpackage -rfakeroot -D -us -uc --source-option=-I -b failed make: *** [deb] Error 29

Hi Dmitry,

Can I use something similar to create package for RedHat Linux? I have the problem that the machine inside the network that I want to use as a master, doesn’t have internet, so I will probably need to create a package(preferably rpm) to install this, but as a Solaris man, I struggle to find a way on the ansible docs. Could you possibly point me in the correct direction?

H.

I build one for CentOS 7 on the openSUSE build service:

http://download.opensuse.org/repositories/home:/ojkastl_buildservice:/CentOS_Zeug/CentOS_7/x86_64/

There is a source rpm, that you might be able to use:
http://download.opensuse.org/repositories/home:/ojkastl_buildservice:/CentOS_Zeug/CentOS_7/src/ansible-2.1.0.0-51.1.src.rpm

Johannes

Not sure about RedHat, but for CentOS 7 you may use the similar operations

$ git clone --recursive --branch v2.0.2.0-1 https://[github.com/ansible/ansible.git](http://github.com/ansible/ansible.git) $ cd ansible && make rpm $ sudo rpm -ivh rpm-build/ansible*centos.noarch.rpm

Oops!

error: Failed dependencies:

python-httplib2 is needed by ansible-2.0.2.0-0.git201604192124.24d9e5e.HEAD.el7.centos.noarch
python-keyczar is needed by ansible-2.0.2.0-0.git201604192124.24d9e5e.HEAD.el7.centos.noarch
python-paramiko is needed by ansible-2.0.2.0-0.git201604192124.24d9e5e.HEAD.el7.centos.noarch
sshpass is needed by ansible-2.0.2.0-0.git201604192124.24d9e5e.HEAD.el7.centos.noarch

We need to install EPEL repository and using yum localinstall in order to avoid broken dependencies

$ wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm $ sudo rpm -ivh epel-release-7-6.noarch.rpm $ sudo yum localinstall rpm-build/ansible*centos.noarch.rpm

Looks like you trying to install it on Debian 8 where only Ansible 1.7.2 is on the standard repos.
You’d tried to add Ubuntu repos and that will not help

Try that:

sudo apt-get update
sudo apt-get install python-pip python-dev git -y
sudo pip install PyYAML jinja2 paramiko
git clone https://github.com/ansible/ansible.git
cd ansible
sudo make install
sudo mkdir /etc/ansible 

sudo cp ~/ansible/examples/hosts /etc/ansible/.