| by Arround The Web | No comments

How to Install and Use Ansible on Windows 11

Infrastructure as the script is made possible by the Ansible toolkit of software applications. Software distribution, system integration, and application deployment features are all included in the fully accessible package. It is possible to use tools and programs created for Unix-like Linux distributions on Microsoft Windows by using the Cygwin POSIX-compatible framework. Cygwin is more likely to be comparable with the Linux environments as it provides us the opportunity to work on many open source tools just like Linux i.e. Ubuntu 20.04, Linux Hint, and many more. Within this article, we are going to explain two different methods to install and then cast off the Ansible infrastructure of the Windows 11 operating system.

Method # 01: Using Cygwin

The first method to install ansible a tour Windows 11 operating system is via the Cygwin tool. Within our first method, we will be showing you a way to install ansible on Windows 11 operating system using the Cygwin environment. You can open any of your favorite browser and search for the “Cygwin” download. It might present you with the official website from where you can download it on your system. The “exe” file of a Cygwin would be of the name “setup-x86_64.exe”. Save it when you get a download dialog like the image below.

The setup file would be downloaded in a few seconds in your Windows 11 operating system. Now, to install the Cygwin environment, right-tap on the installation file and pick “Run as Administrator” to start its installation process.

The installation window named “Cygwin Setup” below might appear on your desktop screen letting you know about its release information. If the installation setup and its information seem feasible to you, continue its setup via the “Next” button listed at the bottom.

Now, it’s time to choose the installation type for the Cygwin environment. The Cygwin Setup window is displaying you three options to choose from. The first option indicates that you can install it from the Internet using your browser and the downloaded files will be kept saved in your local system. We suggest using the first option as it will install all the required utilities along with it. The second option would only let you download Cygwin without installing it. The last option will be helpful when you have a downloaded Cygwin “exe” file on your local system and you just need to configure it.

The next step is to choose the root folder where you will be installing the Cygwin environment on your Windows 11 operating system. Although the setup provides you a default folder to install on your C drive, you can change it as well using the “Browse” button. Then, it will be displaying you the option to install your Cygwin environment for all the users on your Windows 11 operating system or just install it for yourself only. The setup would be recommending you to install it for all by choosing the first option. You can see we have selected the “All Users” option to continue installing it for all the users we have in our Windows 11 operating system. To move forward, click the “Next” button from the listed buttons below.

Now, you must add the path to the local package directory of the currently logged-in user for the installation of Cygwin in it. For this, we have a “Browse” button on this window. You can use this button to continue. Now, move to the next step via the “Next” button available.

Now, you must choose the Internet Connection you need to connect from the available options in this setup wizard. The recommendation is to use the “Direct Connection” option following the “Next” button of this setup wizard step.

Now, choose a URL of a website from where you want to download the mirror file of Cygwin setup along with its other utilities. You can also add your mirror website at the provided text box in front of the “User URL” title. After adding the URL, tap the “Add” button in front of the text box and continue by using the “Next” button.

The setup will display the progress of downloading Cygwin’s mirror files from the selected site.

Now, you have to select the packages you want to install for Cygwin. You have to use the filter by selecting the category as “Full” from the View option and searching for the required package, ansible. When the packages is displayed, choose their release using the “New” column, checkmark the “Src” column checkboxes, and continue to the next step after clicking “Next”.

It will display all the related packages and utilities that are going to get installed on your system within the Cygwin environment. To confirm these installations, tap “Next”.

Now, the packages, including ansible, start to be installed. It might take up to an hour.

After its full installation, you will be shown a new window. You need to checkmark both the shown checkbox options to create a desktop icon and a start menu icon for the Cygwin environment. As the installation status has been displayed as “Complete”, hit the Finish” button.

The desktop icon can be seen on your Windows 11 desktop. You can use ansible in it now.

Method # 02: Using Linux System

You can also install ansible using the Linux system like Ubuntu 20.04. Make sure you have an Ubuntu 20.04 Linux system configured via the Virtual Box. Open and log in from the Ubuntu 20.04 Linux operating system after its successful installation through the iso image file.

Open the Ubuntu 20.04 Linux terminal and update your Linux system first by the utilization of the “apt” utility along with the keyword “update”. Add your password if it asks for it.

Now, you need to install ansible on your Ubuntu 20.04 Linux system using the same “apt” utility. Along with that, use the “install” keyword with the “apt” utility followed by the package name “ansible” and a flag “-y” to force this installation. The setup will start to install ansible on your Linux environment with a delay of one second. Wait for a while until the completion.

After the successful installation of ansible, you can check its installed version on your Linux operating system

Conclusion

This guide has been utilized to help all Windows 11 system users to install Ansible infrastructure. Through this guide, we have explained two different methods to install and configure at our Windows 11 end. The first method contains the installation of the Cygwin tool using its downloaded setup “Exe” file and it took us almost an hour to complete that. A similar way has been utilized as a Unix-like system got installed along with the ansible tools in it. Similarly, we have installed the Ubuntu 20.04 Linux operating system and then configured the “ansible” infrastructure on it using the “apt install” instruction.

Share Button

Source: linuxhint.com

Leave a Reply