logoalt Hacker News

matthiaswhtoday at 1:55 PM1 replyview on HN

I switched from Ansible to Pyinfra for my homelab, and continue to use Ansible at work.

The biggest difference is that Pyinfra is simply Python code. It's incredibly easy to control the system in whatever manner you need to. You can probably do the same thing in Ansible, but it's never quite as obvious how to do it. This also means it's much more clear where and why things work the way they do in Pyinfra, where in Ansible I end up digging through numerous role files to try to find where some variable gets injected.


Replies

SteveNutstoday at 3:07 PM

The worst part of Ansible is data manipulation, what would be an easy dictionary operation in Python is a huge mix of lookups in Ansible.

Incredibly frustrating that the data you want is right there but you can't easily grab it.

show 1 reply