Interview Prep/Ansible/Fundamentals and Architecture

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.

All Ansible questions Roadmap: Ansible

More on Fundamentals and Architecture