HACKER Q&A
📣 umen

Is there any replacement to Ansible? I hate the DSL


Hey , I use Ansible alot and I just hate it's DSL I working with it and don't understand why I need to struggle with it Any replacements that I can use real programing that is agentles?


  👤 undoware Accepted Answer ✓
I feel you.

Ansible means yaml, and yaml reminds me of perl. But not in a fun nostalgic way. Like Perl, yaml has too many "intuitive" features that you never actually use but will for sure be learned, by you, in a hurry, when you typo.

Tbh Nixos is what I use instead of Ansible -- you just open Terminator or xargs or do a plain for-loop in a bash script equivalent, open as many ssh connections as you need, and in each, do a one-liner to git-pull the latest conf repo, and then do `nixos-rebuild switch`.

Rollbacks are just as simple, and the whole thing is idempotent.

Of course you have to have control over which OS is in use, but that's a good reason to advocate for Nixos in your workplace.

The declarative nix language also quite a journey to learn, but when you get it, nothing else will feel good enough again.

Remember to get the treesitter grammar if your editor supports it. I think there is a language server too


👤 tekronis
You'll probably want to checkout https://pyinfra.com/

And also depending on what you're using Ansible for, you may also be able to use Pulumi: https://www.pulumi.com/


👤 melezhik
Try out https://github.com/melezhik/sparrowdo if you are looking for a remote hosts management or sparrow/tomtit ( the same engine ) if only for local tasks ( disclaimer - I am the tools author )

👤 slipwalker
there are "transpilers" for the damn DSL, for instance: https://github.com/brthanmathwoag/jancy

👤 verdverm
SaltStack?