Hello,

As a continuation of my previous post, I will show you how to install Ansible and how to install the win_chocolatey module.

We will focus on the VM in the purple circle in the following schema.

To start with, I have deployed a CentOs 8 VM on which I have used the following commands to install Ansible:

Ansible is available in the EPEL repository of CentOS 8. So, you can easily install Ansible on CentOS 8.

First, update the DNF package repository cache with the following command:

sudo dnf makecache

Now, to enable EPEL repository, install the epel-release package with the following command:

 sudo dnf install epel-release

To confirm the installation, press Y and then press <Enter>. After that, epel-release package should be installed and the EPEL repository should be enabled.

Now, update the DNF package repository cache again with the following command:

sudo dnf makecache

Now, install Ansible with the following command:

sudo dnf install ansible

To confirm the installation, press Y and then press <Enter>. Follow the process till you reach the end of the installation.

Now, run the following command:

 ansible --version

As you can see, I am running Ansible 2.9.17 and it’s working just fine.

For Centos7, please check this link to perform the installation process.

Now, I will install the chocolatey module.

ansible-galaxy collection install chocolatey.chocolatey

Stay tuned for the next article where we will define our target VMs and connect using winrm. 🙂