Can Ansible manage Windows hosts? How?
IntermediateConceptFundamentals and Architecture
Answer
Yes, from a Linux control node. Windows hosts are reached over WinRM (or OpenSSH) and tasks run PowerShell-based modules from the ansible.windows and community.windows collections.
[win]
srv01 ansible_host=10.0.0.20
[win:vars]
ansible_connection=winrm
ansible_winrm_transport=ntlm
ansible_winrm_server_cert_validation=ignore # lab only
ansible_user=Administrator
Modules are named win_* style (ansible.windows.win_feature, win_service, win_copy). Use ansible.windows.win_ping rather than ping to test.
More on Fundamentals and Architecture
What is Ansible and what problem does it solve?BeginnerWhat does "agentless" mean in Ansible?BeginnerWhat are the requirements for the control node?BeginnerWhat does a managed node need?BeginnerIs Ansible push-based or pull-based?BeginnerWalk through what happens when you run `ansible-playbook site.yml`.Intermediate