Enable a Repo the Ansible Way

Recently I need to install a package called Lmod on a Red Hat 8 server. Lmod is available from RHEL 8 EPEL8 repository, however it has a dependency called lua-filesystem which is only available from codeready-builder repository. On my RHEL 8 server, the codeready-builder repository is not enabled by default. Here is how I’ve got Lmod installed manually: # subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms # dnf install Lmod Looking at the above commands, I needed to enable the codeready-builder-for-rhel-8-x86_64-rpms first before installing Lmod....

April 24, 2021 · 2 min · 245 words · kenno

Enable Foreman Ansible Plugin

When I setup Foreman (Satellite) server, I didn’t have Ansible support enabled. Here is how it can be done later on. If we only need Ansible support, it’s sufficient to just run this command: # foreman-installer \ --enable-foreman-plugin-ansible \ --enable-foreman-proxy-plugin-ansible Just a note for myself, I also need Remote Execution enabled if I want to run Ansible playbooks as Job Templates. # foreman-installer \ --enable-foreman-plugin-remote-execution \ --enable-foreman-proxy-plugin-remote-execution-ssh Note that the remote execution feature is enabled by default on Foreman/Satellite server....

March 6, 2021 · 1 min · 102 words · kenno

Install Ansible on Gentoo

Gentoo provides a package called app-admin/ansible for Ansible. To install it, just run: ❯ sudo emerge --ask app-admin/ansible Note that unlike Ansible package on CentOS/Fedora, there is no default ansible.cfg provided with the Gentoo Ansible package. ❯ ansible --version ansible 2.9.9 config file = None configured module search path = ['/home/kenno/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/lib/python-exec/python3.7/ansible python version = 3.7.7 (default, May 9 2020, 19:52:18) [GCC 9....

June 28, 2020 · 1 min · 78 words · kenno

How to Install Ansible on Centos 8

On most Linux distribution, Ansible can be installed either using python3-pip or ansible package. I’m going to show how to get Ansible installed using the second method on CentOS 8. First add the EPEL repository to the CentOS 8 server. # yum localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm Next, install ansible package: # yum install ansible Last metadata expiration check: 0:00:49 ago on Sun 10 Nov 2019 09:33:22 PM AEDT. Dependencies resolved. ======================================================================================================================= Package Arch Version Repository Size ======================================================================================================================= Installing: ansible noarch 2....

November 9, 2019 · 2 min · 233 words · kenno

Install Ansible on Freebsd

This post briefly explains how to install Ansible on a FreeBSD host. I’m going to install Ansible in a virtual environment using Python 3. (If you still use Python 2, it’s time to start migrating to Python 3 now.) $ sudo pkg install python36 $ mkdir ~/dev/python3-venv $ python3 -m venv ~/dev/python3-venv/ansible Next, activate the Python venv (ansible), and start installing Ansible using pip: $ source ~/dev/python3-venv/ansible $ pip install ansible You may or may not need to update pip module as I did....

February 21, 2019 · 1 min · 138 words · kenno