How to install Ansible in Fedora version 38.
Today we're going to talk about the easier way to install and maintain Ansible inside Fedora 38 using the
system repository.
I'm Luca Berton and welcome to today's episode of Ansible Pilot.
How to install Ansible in Fedora 38
Today we're talking about How to install Ansible in Fedora 38.
The good news is that Ansible is included in the default repository so you could install it simply with your usual package manager.
You could expect the latest version of Ansible in the updates repository.
At the moment is available the latest 2.14.6 for ansible-core and 7.6.0 for ansible.
See also:
[Ansible terminology - ansible vs ansible-core packages](/articles/ansible-terminology-ansible-vs-ansible-core-packages).
## Playbook
Let's jump in a quick live Playbook of how to install the latest version of Ansible in Fedora.
code
- install-Ansible-Fedora.sh
``bash
#!/bin/bash
sudo dnf update
sudo dnf list available ansible
sudo dnf install ansible
sudo "rpm -qa | grep ansible"
sudo dnf list ansible
`
execution
``bash
[root@fedora luca]# cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
[root@fedora luca]# ansible
bash: ansible: command not found...
Install package 'ansible-core' to provide command 'ansible'? [N/y] n
[root@fedora luca]# dnf list available ansible-core
Last metadata expiration check: 0:00:27 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Available Packages
ansible-core.noarch 2.14.6-1.fc38 updates
[root@fedora luca]# dnf list available ansible
Last metadata expiration check: 0:00:34 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Available Packages
ansible.noarch 7.6.0-1.fc38 updates
[root@fedora luca]# rpm -qa|grep ansible
[root@fedora luca]# ansible --version
bash: ansible: command not found...
Install package 'ansible-core' to provide command 'ansible'? [N/y] n
[root@fedora luca]# dnf install ansible
Last metadata expiration check: 0:01:06 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Dependencies resolved.
==================================================================
Package Arch Version Repo Size
==================================================================
Installing:
ansible