I have used and followed Ansible for a long time (iirc I was one of the first hundred people to star it on GitHub in the early days) and while I love certain aspects of it (agentless, strong emphasis on idempotency), I found the yaml format to eventually be limiting and inflexible, and have shifted to a more roll-your-own approach to infra with vanilla python and libraries like paramiko and boto3.

I wish there was a convenient way of using the modules (which are robust and powerful) without the yaml format and boilerplate.

Have you taken a look at Pulumi? If infrastructure is going to be code, I’d like to code it in a type-safe DSL please. Otherwise refactoring is hell (as in Ansible).

Another promising effort in this direction is Jetbrains Space, which features CI config in a Kotlin DSL.

I'm trying Pulumi at the moment, it seems pretty nice so far - I love that it's not "yaml templates" or some other DSL, but just regular code.

But it seems like it covers a bit of a different space to Ansible... Pulumi will boot up your infrastructure but you still need something like Ansible to install packages on the nodes afterwards.

My impression of Ansible in the past was that it's more complicated than it was supposed to be.

I kind of hope Pulumi will extend in that direction over time, I would rather use one tool for everything and I don't see why it couldn't. The docs for writing your own providers are a bit weak at the moment though.

PyInfra is probably the closest to Pulumi in the configuration management area (no YAML, can be used as a library).

https://pyinfra.com/

https://github.com/Fizzadar/pyinfra

HN discussion: https://news.ycombinator.com/item?id=23487178