The differences between how Salt and Ansible manage Windows
-
I've never used Ansible, but I was looking through the source code today and discovered how fundamentally different it's approach to managing Windows is from Salt.
In order for Salt states/modules to manage windows it heavily utilizes pywin32, which is a project that is a valiant effort to expose Windows APIs to python. It look like it relies on C++ for some of it's backend.
Ansible uses powershell. It's all in ps1 files, with some snippets written in C# and embedded into the powershell script. Since it's using Powershell, this allows Ansible to tap into .Net, which gives it a development edge on Salt. They can utilize the .Net classes and Powershell commands already created for supporting Windows. Although coding in Powershell looks very ugly.
-
@flaxking said in The differences between how Salt and Ansible manage Windows:
Ansible uses powershell. It's all in ps1 files, with some snippets written in C# and embedded into the powershell script. Since it's using Powershell, this allows Ansible to tap into .Net, which gives it a development edge on Salt. They can utilize the .Net classes and Powershell commands already created for supporting Windows. Although coding in Powershell looks very ugly.
Does this mean that Salt handles older Windows better, because in the SMB we still see a lot of pre-PS Windows machines.
-
@scottalanmiller said in The differences between how Salt and Ansible manage Windows:
@flaxking said in The differences between how Salt and Ansible manage Windows:
Ansible uses powershell. It's all in ps1 files, with some snippets written in C# and embedded into the powershell script. Since it's using Powershell, this allows Ansible to tap into .Net, which gives it a development edge on Salt. They can utilize the .Net classes and Powershell commands already created for supporting Windows. Although coding in Powershell looks very ugly.
Does this mean that Salt handles older Windows better, because in the SMB we still see a lot of pre-PS Windows machines.
Since Ansible currently has Powershell 3 and .Net 4.0 as dependencies for using on Windows, pre-powershell would be a problem.
-
@flaxking said in The differences between how Salt and Ansible manage Windows:
@scottalanmiller said in The differences between how Salt and Ansible manage Windows:
@flaxking said in The differences between how Salt and Ansible manage Windows:
Ansible uses powershell. It's all in ps1 files, with some snippets written in C# and embedded into the powershell script. Since it's using Powershell, this allows Ansible to tap into .Net, which gives it a development edge on Salt. They can utilize the .Net classes and Powershell commands already created for supporting Windows. Although coding in Powershell looks very ugly.
Does this mean that Salt handles older Windows better, because in the SMB we still see a lot of pre-PS Windows machines.
Since Ansible currently has Powershell 3 and .Net 4.0 as dependencies for using on Windows, pre-powershell would be a problem.
And I could certainly see them wanting to increase those requirements in the near future
-
@flaxking said in The differences between how Salt and Ansible manage Windows:
@scottalanmiller said in The differences between how Salt and Ansible manage Windows:
@flaxking said in The differences between how Salt and Ansible manage Windows:
Ansible uses powershell. It's all in ps1 files, with some snippets written in C# and embedded into the powershell script. Since it's using Powershell, this allows Ansible to tap into .Net, which gives it a development edge on Salt. They can utilize the .Net classes and Powershell commands already created for supporting Windows. Although coding in Powershell looks very ugly.
Does this mean that Salt handles older Windows better, because in the SMB we still see a lot of pre-PS Windows machines.
Since Ansible currently has Powershell 3 and .Net 4.0 as dependencies for using on Windows, pre-powershell would be a problem.
Not a huge deal, but potentially limiting for a while.
-
I should give Ansible a go one of these days, because whenever I research it, it seems to fall short of Salt, but it would be nice to really have concrete experience of how it falls short.
My current thinking is that if there's a windows feature that Ansible that Salt doesn't, I could probably just grab the powershell script + any dependent scripts and create Salt state/module wrappers around it.
Alternatively, Salt can run Ansible playbooks on minions, but the wrapper approach is more minimalist (don't have to install Ansible on each minion) and keeps secret security simpler.