I have uninstall ansible 1.9.4 and install with sudo apt-get install ansible
, the version 2.0.2.
But when I execute:
ikerlan$ ansible --version
ansible 1.9.4
I have uninstall and reinstall using ansible ppa, when I install I can see this:
Preparing to unpack .../ansible_2.0.0.2-1ppa~trusty_all.deb ...
Unpacking ansible (2.0.0.2-1ppa~trusty) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Configurando ansible (2.0.0.2-1ppa~trusty) ...
Processing triggers for python-support (1.0.15) ...
But if I check ansible version:
ikerlan@ikerlan-docker:~$ ansible --version
ansible 1.9.4
configured module search path = None
If I run the next:
ikerlan@ikerlan-docker:~$ sudo dpkg -l | grep ansible
ii ansible 2.0.0.2-1ppa~trusty all A radically simple IT automation platform
Any help? Thanks
While upstream support for Ansible 2.9 will cease on May 23, 2022, downstream support for customers of Ansible Automation Platform will continue to exist.
Currently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed. Windows isn't supported for the control machine.
Most like you have actually at some point installed ansible twice - once via PIP and once via apt-get
if you
sudo apt-get remove ansible
and
sudo pip uninstall ansible
then run
compgen -c | grep ansible
You should not have any results.
And then install from the PPA to get version 2
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
run e.g.
ansible-playbook --version
and you should now see
ansible-playbook 2.0.2.0
There is no guarantee you get the latest version just because you uninstalled and reinstalled. As of now Ansible 2.0 is available only through PPA.
Ansible 2.0 Install
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
Here is the right way to upgrade it. Even after installing ansible correctly does not change the version. The solution i found here works nicely. https://groups.google.com/forum/#!topic/ansible-project/eCtBp2aDtCQ
sudo -H pip install --upgrade ansible
Just running this command upgrades and fixes the version too which we check using ansible --version
It will upgrade to latest like now its 2.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With