Our demo introduced the basic usage of ansible and showcased the ability to assess and manage various configurations on a group of client machines. This is very scalable! Not only to additional clients, but also additional platforms.
For reference we used examples in the following git repo:
https://github.com/redmondmj/ansible_lab
Probably Windows! There are a number of ways to authenticate to our Windows hosts and a number of modules that we can use to manage Windows servers and clients!
To test a simple password based authentication
Identify a (maybe a few) target Windows client(s) and ensure network connectivity. Options:
Prepare the client machine
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
Enable-PSRemoting -SkipNetworkProfileCheck
Run the script
Add the Windows hosts and their creds to your inventory file on your Ansible Control Node
Your Ansible Control Node will use a python module to execute WinRM tasks so you should probably install it using pip (this may already be installed)
sudo apt install python3-pippip install pywinrm --break-system-packagesYou may also want to use the Windows Modules, make sure they are installed:
ansible-galaxy collection install ansible.windows<aside> ☝🏽
Notice: If your playbook requires other modules, you can use this same method to add them!
</aside>
Test connectivity by running an ad-hoc command like ping
ansible -i inventory.ini windows -m win_pingRun some playbooks!
You’ll find some examples already provided in the git repo:
ansible-playbook -i inventory.ini playbooks/playbookDemo.yml
Screenshot the Demo Playbook output!
https://github.com/redmondmj/ansible_lab/tree/master/playbooks
AI Is good at writing these playbooks , but be careful not to let it over complicate things. Ansible is intended to be simple!