Hello Techies, welcome back. This blog is in continuation of the previous introductory blog and second part of the series Ansible with Windows. I request you to please visit the introductory blog to have an idea about what is Ansible. But if you already know you can just start with this blog of how to install Ansible on Windows. So, let’s get started.
Now, Ansible can only be installed on Linux operating system, so, the question is how it can be installed on Windows. For that please go through the blog to learn and know how to install it on Windows.
Things to consider and steps to install Ansible on Windows:
Things to consider and steps to install Ansible on Windows:
- Make sure you have .Net framework 4.8 or above.
- Make sure you have PowerShell version 5.0 or above.
- Enable WSL (Windows Sub-System for Linux) inWindows, which will work as an Ansible Controller.
- Install Ubuntu App from Windows App Store.
- Install Ansible on Ubuntu.
- Configure WinRM on Windows so that it can communicate with Ansible Controller (WSL)
So, let’s understand what is WSL. WSL which is a Windows Sub-System for Linux which gives you a Linux Environment. To enable WSL on windows. Open PowerShell as Administrator and run:
a. Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
b. Press Enter. Wait. Prompt for Restart. Press Y
a. Go to Control Panel -> Program Features. Click
on Turn Windows features on or off .
b. Check the box in front of Windows Subsystem for
Linux. Click OK and Restart the computer.
Install Ubuntu
a. Open Microsoft App Store and Search Ubuntu:
b. Click on Ubuntu and Install it. When prompted to
Sign-In just close the prompt it will start downloading and install it without Sign-In.
Install Ansible on Ubuntu
a. Open Ubuntu App and create username and password.
b. To work as a admin/root (sudo in Linux) user type
in:
Sudo su and type the password you created for your user above, you will be logged in as
root user now with Admin rights.
c. To install Ansible using Pip type the following
commands:
apt update
apt upgrade -y
apt install python3-pip -y
pip3 install ansible (it will take 40 minutes,
so please wait patiently)
pip3 install winrm
d. To check if it is installed type ansible --version
Configure WinRM on Remote Client
a. Download the WinRM configuration script and save
it as ConfigureRemotingForAnsible.ps1on Desktop: https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
b. Open PowerShell as Admin and type:
So, this is how we install Ansible on Windows using WSL. This blog
explains how to set up the environment for Ansible on Windows. Hope the details
help you as well. In the coming blog we will look at how can we ping the Windows
host machine from Ansible Controller and will create our first playbook as
well.
About Amlgo
Labs : Amlgo Labs is an
advanced data analytics and decision sciences company based out in Gurgaon and
Bangalore, India. We help our clients in different areas of data
solutions includes design/development of end to end
solutions (Cloud, Big Data, UI/UX, Data Engineering, Advanced Analytics
and Data Sciences) with a focus on improving businesses and providing
insights to make intelligent data-driven decisions across verticals. We have
another vertical of business that we call - Financial Regulatory Reporting for
(MAS, APRA, HKMA, EBA, FED, RBI etc) all major regulators in the world
and our team is specialized in commonly used regulatory tools across the
globe (AxiomSL
Controller View, OneSumX Development, Moody’s
Risk, IBM Open Pages etc).We build
innovative concepts and then solutions to give an extra edge to the business
outcomes and help to visualize and execute effective decision strategies. We are among top 10 Data Analytics Start-ups in India, 2019 and 2020.
Please feel free to comment or share your views and thoughts. You can always reach out to us by sending an email at info@amlgolabs.com or filling a contact form at the end of the page.
Comments
Post a Comment