In this video I'll take you through how to create custom windows facts to use in Ansible.
You can find all the code for this demo here: https://github.com/dmccuk/Ansible_win...
Clone the code and follow along!
SETUP:
Ansible Control Node: Ubuntu 20.04
Ansible version 2.9+
Windows 2022 server - Built in AWS - base image
We'll install Apache as part of the video on the Windows 2022 server and then create a local.ps1 file to run on fact collection from Ansible. I'll show you how to collect the version from two places which should cover off how to do this on your own server.
Let me know in the comments if it worked for you and what else you've added to your facts!
#ansible #windows #customfacts