windows host automation

33 views
Skip to first unread message

Sakshi Jain

unread,
Aug 19, 2021, 5:31:22 AM8/19/21
to ansible...@googlegroups.com
For windows host 

How to write tasks in ansible :

  1. Login into RDP machine 
  2. Login into other machines from RDP machine 
  3. Read email before starting the patching in the scheduled time
  4. Run any commands in rdp machine , like below :
  5. To shutdown : shutdown /r /f /m \\<servername> 
  6. Reboot status : systeminfo /s <servername> | find “ System Boot Time “
  7. Verify the timezone 
  8. Uptime of the server , store it in a file 
  9. Check ToNCR task from task scheduler , task is scheduled as cron job in every 5minutes 
  10. Send email to predefined recipients for task update 
  11. Read logs , scheduler logs , hmlogs , publish logs 

Sakshi Jain

unread,
Aug 19, 2021, 5:34:34 AM8/19/21
to ansible...@googlegroups.com

Wei-Yen Tan

unread,
Aug 19, 2021, 5:35:38 AM8/19/21
to ansible...@googlegroups.com
For of all ansible does not use rdp not any windows gui automation. Translate that to actions that you can do programmatically and come back 

From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of Sakshi Jain <jainsa...@gmail.com>
Sent: Thursday, August 19, 2021 9:30:49 PM
To: ansible...@googlegroups.com <ansible...@googlegroups.com>
Subject: [ansible-project] windows host automation
 
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CANPH-qzpBUfoSFGAu_4WJ_fgMw4Z8-Jy%3DuTb4W%3DTNd_dkBg7Gw%40mail.gmail.com.

Melvin Satheesan

unread,
Aug 19, 2021, 6:41:36 AM8/19/21
to ansible...@googlegroups.com

You won't use rdp to communicate with windows. 

You can use winrm, 3389 is the port. 
windows_upadate module is available in ansible. 

You can use * in category name Or you can create an array and pass the update type. 

Reboot too can be achieved by giving a boolean attribute. 

Rather taking system update in the same play, use another play for ping test and system info so that you will get a comprehensive list. 

--
Reply all
Reply to author
Forward
0 new messages