Enable epel repository
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
First, update the DNF package repository cache with the following command:
sudo dnf makecache
Now, install Ansible with the following command:
sudo dnf install ansible
ansible --version
ansible 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Sep 9 2021, 07:49:02) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
Install git
sudo dnf install git
Playbook LEMP example:
git clone https://github.com/FlexibleToast/CentOS-8-LEMP