Monthly Archives: May 2023

Install Ansible in Raspberry Pi (Raspbian)

Raspbian is based on Debian rather than Ubuntu, so, we need a bit of adjustment in order to install Ansible PPA on Raspbian. Here is my notes for the installation

Firstly, update Raspbian info, so Raspbian is aware of its codename “bullseye”

sudo nano /usr/share/python-apt/templates/Raspbian.info

Suite: bullseye
RepositoryType: deb
BaseURI: http://raspbian.raspberrypi.org/raspbian/
MatchURI: http://raspbian.raspberrypi.org/raspbian/

Next, we need to install the required packages

sudo apt install software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367

Next, we need to manually add the apt source, we must manually add the file instead of using apt-add-repository

sudo nano /etc/apt/sources.list.d/ansible.list

deb [arch=armhf] http://ppa.launchpad.net/ansible/ansible/ubuntu focal main

Finally, use “apt install” to install

sudo apt search ansible

And verify with

ansible --version