Hi all,
If you’re on the Windows side, you probably know about PowerShell DSC, which is Microsoft’s up and coming config management engine. I’ve been quite sceptical to DSC for a long time, because of the way it tries to be a configuration engine but really has ended up as a pseudo-config management tool - and not a very good one. Ansible and DSC has not played very well together because of DSC’s requirement to invoke a full “description” of a node’s desired config - a far cry from Ansible’s variable-driven and orchestrated approach.
However, the last version of the PowerShell v5 beta shows some real progress (and I’m betting this is because MS listens closely to Chef on how to develop DSC further). They basically abandoned the holistic “state” view of a node and instead allow injecting small config blocks to the engine, which then executes it, reports failure or sucess, and moves on. Reading about this it felt a lot more ansible-like, so I decided to start wiring together a test module for it.
The good thing about DSC is that Microsoft is doing a lot of module development for DSC, which will benefit anyone using the platform. Things we in the Ansible community are “struggling” with building out modules fast enough for, such as robust package management, domain join, pretty much anything you can think of related to the operating system already has a DSC module freely available.
In my opinion, this is a golden opportunity for Ansible to ramp-up its Windows support very fast. There was one thing nagging me, and that was how to implement it: It’s up to each DSC resource to specify the parameters it accepts (much like Ansible modules), so I decided to build a test module for DSC in Ansible which accepts dynamic parameters and just passes these to the underlying DSC resource (with a few exceptions).
I’ve written a few blog posts about this the last couple of days, along with a working end-to-end example using (mostly) DSC to set up php, mysql and wordpress on a Windows node. You can find these two here:
http://hindenes.com/trondsworking/2015/02/20/dsc-ansible/
http://hindenes.com/trondsworking/2015/02/21/megapost-getting-up-and-running-with-ansible-and-dsc/
I’d really like some feedback from the community on how Ansible might leverage DSC. To me it looks like an opportunity too god to let go.
-Trond