Score:0

Installing Ansible 2.9 on Ubuntu 21.04

cn flag

Is it possible to install Ansible 2.9 on Ubuntu 21.04 via apt?

Apt on Ubuntu 21.04 installs Ansible 2.10 by default, and playbooks written for Ansible 2.9 do not always work well on Ansible 2.10.

The command

apt install -y ansible=2.9.*

doesn't work on Ubuntu 21.04, even if I add the ppa:ansible/ansible repository as recommended by the Ansible docs.

br flag
Related, from another SE site: [Getting older packages from ppa](https://askubuntu.com/questions/231074/getting-older-packages-from-ppa)?
Score:1
cn flag

Even though Ansible 2.10 is the release that split modules out as collections, your prior playbooks should still work.

The ansible package bundles the previous modules and plugins. Short names from 2.9 are aliased to the fully qualified collection names.

2.10 Porting Guide contains behavior changes from 2.9 to 2.10. Undocumented behavior changes are bugs, please file an issue in that collection's issue tracker, a link is on that collection's Ansible Galaxy listing.


To stay on 2.9 for a while longer, consider uninstalling the deb packages and installing from pip. Even though I like OS package management for everything, convenient to use pip to install whatever version in my home directory or a virtualenv, and avoid getting clever with apt.

As of July 2021, both Debian packaging of ansible and Ansible's PPA lag behind the official pip package. The latter of which is currently at version 4.2. Choose what package you want, but keep in mind that all third party packages are lagging.

Score:0
in flag

If you cant install it try sudo apt-get update. This updates all the repository list.

Score:0
br flag

Yes, it's possible. The package Ansible 2.9 is available for Ubuntu 21.04 Hirsute Hippo.

sv flag
Ref: https://launchpad.net/ubuntu/hirsute/amd64/ansible . Its status is "superseded". So, we may have to download the `.deb` file manually to install it.
br flag
The [package](http://launchpadlibrarian.net/516153033/ansible_2.9.16+dfsg-1.1_all.deb) is still available. Try to download and install it manually. I'm also curious why do they supersede it? At the moment Ansible 2.9, 2.10, 2.11 are supported (the latest 3 versions) by upstream. Lack of resources to maintain all versions at devel branch perhaps?
vmayorow avatar
cn flag
So only manual installation is possible, there's no possibility to to install Ansible 2.9 via apt in Ubuntu 21.04?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.