| ▲ | wowi42 6 hours ago | ||||||||||||||||||||||
Disclosure: PyInfra core contributor here. We just shipped 3.8.0. PyInfra is an agentless infrastructure automation tool. Same job description as Ansible, Salt, Chef. SSH into hosts, describe desired state, it diffs and converges. No agent, no central server, no daemon. The difference: your "playbook" is just Python. Not Python cosplaying as YAML. Not Jinja smuggled inside YAML inside a Helm chart inside a Kustomize overlay. Actual Python:
Idempotent operations. Facts gathered from hosts, branched on with normal `if` statements. Real loops, real imports, a real debugger, real type hints. Your editor autocompletes arguments because, brace yourself, they are just function signatures.About YAML. Wonderful format. For about eleven minutes. Then someone needs an `if`, and you have `{% if %}` inside a string inside a list inside a map. Then someone types `no` as a country code for Norway and it ships to prod as `False`. Then someone indents with a tab and the parser dies without saying where. Congratulations, you reinvented a programming language. Badly. The honest move is to admit you wanted code, then write code. PyInfra skips the eleven good minutes and goes straight to code. Release notes in the link. Happy to answer questions. Infrastructure as Code, not infrastructure as YAML. | |||||||||||||||||||||||
| ▲ | bmurphy1976 an hour ago | parent | next [-] | ||||||||||||||||||||||
Thank you for this. I've implemented my own version of this a couple times over the previous 25 years. This is how my code always looked. I've used Salt, CFEngine, Chef, Puppet, Make, Bash, and many hand-rolled iterations of this approach. I finally threw in the towel and forced myself to come to terms with Ansible and it's quirks because I needed the wider community support. Now with AI tooling, I'm not so convinced the community modules moat is an actual moat. I'm going to very seriously consider porting all my Ansible code to this and see how it feels. I anticipate I'll be much happier after the change. Do you have any plans to integrate with/build on other communities modules? i.e. even if it's not perfect, being able to call Ansible or Salt modules from PyInfra would be one way to fill the gap. | |||||||||||||||||||||||
| ▲ | zahlman 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
As a heads-up, your comments here were flagged. I think some people must have thought your (current) writing style rather LLM-ish. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | mxey 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
The problem is that it is actually not just Python, branched with “normal if statements”: https://docs.pyinfra.com/en/3.x/deploy-process.html#checking... | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | vardalab 2 hours ago | parent | prev [-] | ||||||||||||||||||||||
Yeah, but I have Claude Code or Codex do this Ansible stuff and they do just fine with all this and then there's a gazillion of examples that they can lean on and once the patterns are established, it's pretty smooth. Opus 4.5 was when the big inflection was I was heavy into automation all summer. It was Opus 4.0. It was like pulling teeth. And then when 4.5 came out, it was just beautiful. | |||||||||||||||||||||||
| |||||||||||||||||||||||