How to install Ansible in Gentoo Linux

The easier way to install and maintain up-to-date Ansible inside Gentoo Linux using the “portage” package manager.

Luca Berton

--

How to install Ansible in Gentoo Linux?
Today we’re going to talk about the easier way to install and maintain Ansible inside Gentoo using the default “portage” package manager.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

How to install Ansible in Gentoo Linux

  • Included in “app-admin/ansible” of Portage

Today we’re talking about How to install Ansible in Gentoo.

The good news is that Ansible is included in the “app-admin/ansible” repository so you could install it simply with your usual package manager “emerge” for Portage.

You could expect the latest version of Ansible to maintain up-to-date with Portage.

Links

demo

Let’s jump in a quick live demo of how to install the latest version of Ansible using emerge for Portage.

  • Install-Ansible-Gentoo.sh
#!/bin/bash
$ sudo emerge --sync
$ sudo emerge --ask app-admin/ansible
$ sudo emerge -pv app-admin/ansible

execution

$ ssh devops@gentoo.example.com
devops@gentoo ~ $ sudo su
gentoo /home/devops # cat /etc/os-release
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo/Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
gentoo /home/devops # cat /etc/gentoo-release
Gentoo Base System release 2.7
gentoo /home/devops # uname -a
Linux gentoo 5.10.76-gentoo-r1 #1 SMP Tue Nov 23 04:46:43 PST 2021 x86_64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz GenuineIntel GNU/Linux
gentoo /home/devops # emerge --sync
>>> Syncing repository 'gentoo' into '/usr/portage'...
* Using keys from…

--

--

Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday