Ansible Pilot

How to install Ansible in Ubuntu 22.10 Kinetic Kudu — Ansible Install

How to install ansible using the universe and PPA repositories in Ubuntu 22.10 Kinetic Kudu.

November 29, 2022
Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons

How to install Ansible in the latest Ubuntu 22.10.

Today we’re going to talk about the easier way to install and maintain Ansible inside Ubuntu 22.10 with the distribution tools. I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

How to install Ansible in Ubuntu 22.10

Today we’re talking about how to install Ansible in Ubuntu 22.10 Kinetic Kudu. We’re going to see the easy way to install and maintain Ansible inside Ubuntu with the distribution tools.

We are going to see how to install Ansible using the universe repository, the default that you get after installation.

The main advantage of using the universe repository is that you don’t require any external repository. At the moment the installation of Ansible using the PPA repository is not available. Please bear in mind that adding an additional repository has a different quality assurance of software.

See also: Ansible terminology - ansible vs ansible-core packages.

The Best Resources For Ansible

Certifications

Video Course

Printed Book

eBooks

demo

How to install Ansible in Ubuntu 22.10 Kinetic Kudu with universe repository.

universe

#!/bin/bash
sudo apt update
sudo apt install ansible
$ ssh [email protected]
[email protected]'s password: 
Welcome to Ubuntu 22.10 (GNU/Linux 5.19.0-23-generic aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Tue Nov 29 11:45:49 PM UTC 2022

  System load:  0.45751953125     Processes:               230
  Usage of /:   30.4% of 9.75GB   Users logged in:         1
  Memory usage: 6%                IPv4 address for ens160: 192.168.246.129
  Swap usage:   0%


3 updates can be applied immediately.
To see these additional updates run: apt list --upgradable


Last login: Tue Nov 29 23:44:25 2022 from 192.168.246.1
luca@ubuntu:~$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.10"
NAME="Ubuntu"
VERSION_ID="22.10"
VERSION="22.10 (Kinetic Kudu)"
VERSION_CODENAME=kinetic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=kinetic
LOGO=ubuntu-logo
luca@ubuntu:~$ ansible
Command 'ansible' not found, but can be installed with:
sudo apt install ansible-core
luca@ubuntu:~$ sudo su
[sudo] password for luca: 
root@ubuntu:/home/luca# apt list available ansible
Listing... Done
ansible/kinetic,now 5.5.0-1 all [residual-config]
root@ubuntu:/home/luca# apt list available ansible-core
Listing... Done
ansible-core/kinetic 2.12.4-1 all
root@ubuntu:/home/luca# apt-get update
Hit:1 http://ports.ubuntu.com/ubuntu-ports kinetic InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports kinetic-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports kinetic-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports kinetic-security InRelease
Reading package lists... Done
root@ubuntu:/home/luca# apt-get install ansible
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  ansible-core ieee-data python3-argcomplete python3-dnspython
  python3-jmespath python3-kerberos python3-libcloud python3-lockfile
  python3-netaddr python3-ntlm-auth python3-packaging python3-pycryptodome
  python3-requests-kerberos python3-requests-ntlm python3-requests-toolbelt
  python3-resolvelib python3-selinux python3-simplejson python3-winrm
  python3-xmltodict
Suggested packages:
  cowsay sshpass python3-sniffio python3-trio python-lockfile-doc ipython3
  python-netaddr-docs
The following NEW packages will be installed:
  ansible ansible-core ieee-data python3-argcomplete python3-dnspython
  python3-jmespath python3-kerberos python3-libcloud python3-lockfile
  python3-netaddr python3-ntlm-auth python3-packaging python3-pycryptodome
  python3-requests-kerberos python3-requests-ntlm python3-requests-toolbelt
  python3-resolvelib python3-selinux python3-simplejson python3-winrm
  python3-xmltodict
0 upgraded, 21 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/27.0 MB of archives.
After this operation, 332 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package python3-packaging.
(Reading database ... 78148 files and directories currently installed.)
Preparing to unpack .../00-python3-packaging_21.3-1.1_all.deb ...
Unpacking python3-packaging (21.3-1.1) ...
Selecting previously unselected package python3-resolvelib.
Preparing to unpack .../01-python3-resolvelib_0.8.1-1_all.deb ...
Unpacking python3-resolvelib (0.8.1-1) ...
Selecting previously unselected package python3-pycryptodome.
Preparing to unpack .../02-python3-pycryptodome_3.11.0+dfsg1-3build1_arm64.deb ...
Unpacking python3-pycryptodome (3.11.0+dfsg1-3build1) ...
Selecting previously unselected package python3-dnspython.
Preparing to unpack .../03-python3-dnspython_2.2.1-2_all.deb ...
Unpacking python3-dnspython (2.2.1-2) ...
Selecting previously unselected package ieee-data.
Preparing to unpack .../04-ieee-data_20220827.1_all.deb ...
Unpacking ieee-data (20220827.1) ...
Selecting previously unselected package python3-netaddr.
Preparing to unpack .../05-python3-netaddr_0.8.0-2_all.deb ...
Unpacking python3-netaddr (0.8.0-2) ...
Selecting previously unselected package ansible-core.
Preparing to unpack .../06-ansible-core_2.12.4-1_all.deb ...
Unpacking ansible-core (2.12.4-1) ...
Selecting previously unselected package ansible.
Preparing to unpack .../07-ansible_5.5.0-1_all.deb ...
Unpacking ansible (5.5.0-1) ...
Selecting previously unselected package python3-argcomplete.
Preparing to unpack .../08-python3-argcomplete_2.0.0-1ubuntu1_all.deb ...
Unpacking python3-argcomplete (2.0.0-1ubuntu1) ...
Selecting previously unselected package python3-jmespath.
Preparing to unpack .../09-python3-jmespath_1.0.1-1_all.deb ...
Unpacking python3-jmespath (1.0.1-1) ...
Selecting previously unselected package python3-kerberos.
Preparing to unpack .../10-python3-kerberos_1.1.14-3.1build5_arm64.deb ...
Unpacking python3-kerberos (1.1.14-3.1build5) ...
Selecting previously unselected package python3-lockfile.
Preparing to unpack .../11-python3-lockfile_1%3a0.12.2-2.2_all.deb ...
Unpacking python3-lockfile (1:0.12.2-2.2) ...
Selecting previously unselected package python3-simplejson.
Preparing to unpack .../12-python3-simplejson_3.17.6-1build1_arm64.deb ...
Unpacking python3-simplejson (3.17.6-1build1) ...
Selecting previously unselected package python3-libcloud.
Preparing to unpack .../13-python3-libcloud_3.4.1-5_all.deb ...
Unpacking python3-libcloud (3.4.1-5) ...
Selecting previously unselected package python3-ntlm-auth.
Preparing to unpack .../14-python3-ntlm-auth_1.4.0-2_all.deb ...
Unpacking python3-ntlm-auth (1.4.0-2) ...
Selecting previously unselected package python3-requests-kerberos.
Preparing to unpack .../15-python3-requests-kerberos_0.12.0-2_all.deb ...
Unpacking python3-requests-kerberos (0.12.0-2) ...
Selecting previously unselected package python3-requests-ntlm.
Preparing to unpack .../16-python3-requests-ntlm_1.1.0-2_all.deb ...
Unpacking python3-requests-ntlm (1.1.0-2) ...
Selecting previously unselected package python3-requests-toolbelt.
Preparing to unpack .../17-python3-requests-toolbelt_0.9.1-2_all.deb ...
Unpacking python3-requests-toolbelt (0.9.1-2) ...
Selecting previously unselected package python3-selinux.
Preparing to unpack .../18-python3-selinux_3.4-1_arm64.deb ...
Unpacking python3-selinux (3.4-1) ...
Selecting previously unselected package python3-xmltodict.
Preparing to unpack .../19-python3-xmltodict_0.12.0-2_all.deb ...
Unpacking python3-xmltodict (0.12.0-2) ...
Selecting previously unselected package python3-winrm.
Preparing to unpack .../20-python3-winrm_0.3.0-3_all.deb ...
Unpacking python3-winrm (0.3.0-3) ...
Setting up python3-lockfile (1:0.12.2-2.2) ...
Setting up python3-requests-toolbelt (0.9.1-2) ...
Setting up python3-ntlm-auth (1.4.0-2) ...
Setting up python3-pycryptodome (3.11.0+dfsg1-3build1) ...
Setting up python3-resolvelib (0.8.1-1) ...
Setting up python3-kerberos (1.1.14-3.1build5) ...
Setting up python3-simplejson (3.17.6-1build1) ...
Setting up python3-xmltodict (0.12.0-2) ...
Setting up python3-packaging (21.3-1.1) ...
Setting up python3-jmespath (1.0.1-1) ...
Setting up python3-requests-kerberos (0.12.0-2) ...
Setting up ieee-data (20220827.1) ...
Setting up python3-dnspython (2.2.1-2) ...
Setting up python3-selinux (3.4-1) ...
Setting up python3-argcomplete (2.0.0-1ubuntu1) ...
Setting up python3-requests-ntlm (1.1.0-2) ...
Setting up python3-libcloud (3.4.1-5) ...
Setting up python3-netaddr (0.8.0-2) ...
Setting up python3-winrm (0.3.0-3) ...
Setting up ansible-core (2.12.4-1) ...
Setting up ansible (5.5.0-1) ...
Processing triggers for man-db (2.10.2-2) ...
Scanning processes...                                                           
Scanning processor microcode...                                                 
Scanning linux images...                                                        

Running kernel seems to be up-to-date.

Failed to check for processor microcode upgrades.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@ubuntu:/home/luca# apt list available ansible
Listing... Done
ansible/kinetic,now 5.5.0-1 all [installed]
root@ubuntu:/home/luca# apt list available ansible-core
Listing... Done
ansible-core/kinetic,now 2.12.4-1 all [installed,automatic]
root@ubuntu:/home/luca# ansible --version
ansible [core 2.12.4]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.7 (main, Nov  2 2022, 18:49:29) [GCC 12.2.0]
  jinja version = 3.0.3
  libyaml = True
root@ubuntu:/home/luca#

PPA

#!/bin/bash
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt remove ansible
sudo apt install ansible-core

Not available at the moment (30th November 2022)

Recap

Now you know how to install ansible using universe repository in Ubuntu 22.10 Kinetic Kudu. Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.

Academy

Learn the Ansible automation technology with some real-life examples in my

My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps

BUY the Complete PDF BOOK to easily Copy and Paste the 250+ Ansible code

Want to keep this project going? Please donate

Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons
Follow me

Subscribe not to miss any new releases