MANAGE WINDOWS SERVER WITH ANSIBLE

preview_player
Показать описание
Ansible is one of the widely used CM and CD tool in the current market.
Same time we should have knowledge on working on various operating systems with Ansible.
In this video we will learn how we can manage the windows server using Ansible.

Platform Used:
AWS
Ubuntu Linux Server (Ansible) (EC2 Instance)
Windows Server (EC2 Instance)
Pre-requisite:
You should have knowledge on Installing and working with Ansible

Useful Links:
Overview On Ansible and Installation:

Creation and connecting Windows Server:

Configuring HTTPS listener in Windows:

Step1: Create Certificate
New-SelfSignedCertificate -DnsName "DNS Name" -CertStoreLocation Cert:\LocalMachine\My
Step2:
Whitelist port 5985(winrm-http) and 5986(winrm-https) in the security group of the the windows server.
Step3: Create HTTPS Listener
winrm create winrm/config/Listener?Address=*+Transport=HTTPS '@{Hostname="DNS Name"; CertificateThumbprint="ThumbPrint"}'
Step4:
# Add new firewall rule for 5986
netsh advfirewall firewall add rule name="Windows Remote Management (HTTPS-In)" dir=in action=allow protocol=TCP localport=5986
Step5:
Check the listener and make sure https listener is there.
winrm e winrm/config/Listener

Check The Service
winrm get winrm/config
Make sure the Basic Auth is set to true, if not then execute below commands.
Set-Item -Force WSMan:\localhost\Service\auth\Basic $true

#devops #ansible #windows #automation #aws #ec2 #linux

SUBSCRIBE to my channel:

-: FOLLOW ME :-
Рекомендации по теме
Комментарии
Автор

You just saved my life. Thanks you so much !

tiendat
Автор

thanks, got it working from your video, AAP 2.4 with server 2022

ortizs
Автор

in terms of runnig patches usig ansible how do you go about on that

LoyisoNicholusGawula
Автор

Sir do we need service account for authentication b/w windows and linux ?

HarishNelapati
Автор

how can i execute a .exe file via ansible playbook, please share any example

kirtikumar
Автор

this what i am looking for.
I have one doubt here when we are executing taks like below
- name: Install IIS (Web-Server only)
ansible.windows.win_feature:
name: Web-Server
state: present

these are using cmd or powershell at the time of executing?
i am confusing here
Please help me on this?

Googlepaynnn
Автор

Thanks for your detailed explanation, as i tried i am getting this issue "Failed to connect to the host via ssh: Connection timed out during banner exchange" plz help

phanirajendra