Ansible or PowerShell DSC for Windows?
AdvancedProductionArchitecture Decisions and Tool Comparisons
Answer
- Ansible (
ansible.windows,community.windows,microsoft.ad) over WinRM or SSH: one tool for Linux and Windows, agentless, easy orchestration across both. Good module coverage for features, services, registry, updates, IIS and Active Directory. - DSC: native Windows desired state with continuous enforcement through the Local Configuration Manager, deep coverage through DSC resources.
They combine well: ansible.windows.win_dsc runs any DSC resource from a playbook, so you get DSC's coverage with Ansible's orchestration and inventory.
- ansible.windows.win_dsc:
resource_name: WindowsFeature
Name: Web-Server
Ensure: Present
Choose DSC alone only for Windows-only shops that need continuous enforcement and already have the skills.
More on Architecture Decisions and Tool Comparisons
Ansible or Terraform: where do you draw the line?BeginnerHow does Ansible compare with Puppet, Chef and Salt?IntermediateWhy use Ansible instead of shell scripts?BeginnerWhere does Ansible fit once you run Kubernetes?Intermediatecloud-init or Ansible for first boot configuration?IntermediateWhen would you use AWS Systems Manager instead of, or together with, Ansible?Intermediate