For windows host
How to write tasks in ansible :
- Login into RDP machine
- Login into other machines from RDP machine
- Read email before starting the patching in the scheduled time
- Run any commands in rdp machine , like below :
- To shutdown : shutdown /r /f /m \
- Reboot status : systeminfo /s | find “ System Boot Time “
- Verify the timezone
- Uptime of the server , store it in a file
- Check ToNCR task from task scheduler , task is scheduled as cron job in every 5minutes
- Send email to predefined recipients for task update
- Read logs , scheduler logs , hmlogs , publish logs