frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

PyInfra 3.8.0 Is Out

https://github.com/pyinfra-dev/pyinfra/releases/tag/v3.8.0
73•wowi42•1h ago

Comments

mark_l_watson•1h ago
That would have been very useful to me, before I retired! That said, I only run the Hermes Agent on leased VPSs and PyInfra might be a cool and easy to access Hermes - I need to think about that.
dist-epoch•1h ago
I tried something like that, using PyInfra to setup VMs for agent. But gave up, too much complexity for too little gain. Just ask the agent to create a small install script.
V__•1h ago
Has anyone used this and ansible and is able to give a short comparison with likes and dislikes?
hylaride•1h ago
At a previous job we used it to test our ansible playbooks via molecule, which were part of a CI/CD pipeline to create AWS AMIs.

It worked well and was nicer to deal with than test kitchen for testing UNIXy things (is service running and/or enabled, does file have right permissions, does file include $TEXT, etc). It was very useful for us during big linux upgrades, such as when ubuntu went from upstart to systemd. It can also be good at capturing edge cases with brittle outcomes (especially as ansible went through enormous changes after the red hat acquisition).

Dislikes? I had to fight with pyenvs a bit..

gegtik•48m ago
was this before uv? i feel like my pyenv struggles basically ceased once I started using it
hylaride•34m ago
I used it between 20016-2023 and since we were not a python shop, I never used any other package managers. It was never an issue with CI/CD pipeline, but iterating locally was always a fight to getting molecule to pick up the right pyenv. It got better towards the end, though.

Honestly the bigger issue was testing x86 docker images on an arm mac, as molecule didn't cleanly support cross platform images and we did pull in x86 binaries for our playbooks (by the end of my time at said company, I was also directly managed by product managers who didn't care about tech debt and I couldn't deal with the otherwise desirable idea to move our compute to ARM - a rant for another day). This may also be fixed now.

matthiaswh•48m ago
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.

Boxxed•45m ago
Pyinfra is what ansible should have been. It's straight python rather than a janky mix of yaml, templates, and bolted-on control flow primitives.
polski-g•17m ago
There is this: https://github.com/seantis/suitable

But the main guy who developed it at that company left, so no idea on its longevity.

ktm5j•1h ago
This seems cool, I'd particularly be interested if their 10x faster than Ansible claims pan out. Has anyone here used PyInfra? If so what's your experience been like?
eurekin•1h ago
On my homelab. It really feels like a dream come true for my usecase. No more puppet agents. No more declarative syntax, that you have to work around to do basic imperative ways. Or use a module, that stopped being maintained 3 years ago. Just plop a file here and there through ssh.
alanwreath•51m ago
Same here, my home lab is all pyinfra. I’m not sure if it’s my previous experience with ansible that made it simple for me or just the relative size of my home lab compared to larger companies where I’ve used ansible - but it seemed much easier to me and easier to follow.
hathym•54m ago
i tried ansible before and hated it, this idea is genius.
ssddanbrown•49m ago
I've been using PyInfra for a while, albeit just for simple automation (Updating systems, checking certain stats) and I'm a big fan. Compared to Ansible, I found the docs, syntax and usage patterns much easier to get on with. Might just be a preference thing, but I always had trouble going through the Ansible docs.

Ran into some bugs, like one machine that seems to cause errors and mess up the output on restart, although that looks like it might have been addressed in this release.

If it helps, I put together a video when initially exploring PyInfra: https://www.youtube.com/watch?v=S-_0RiFnKEs

appplication•42m ago
The is cool, thank you for sharing. I was just thinking about onboarding to ansible since I’ve just been following a manual checklist of commands for my remote server but based on positive feedback here I’ll probs oh give this a shot. Only downside is I imagine LLMs are probably a little more proficient at ansible just due to volume of training data.
odie5533•42m ago
Does it have an equivalent to konstruktoid's hardening Ansible playbook?
wowi42•35m ago
we could put it on our roadmap of examples :-)
gandreani•40m ago
There's a video!

I can't get over the fact of how suspicious he looks while doing it. And doesn't even cover his face. Crazyness

https://x.com/porqueTTarg/status/2047652413306277970 https://xcancel.com/porqueTTarg/status/2047652413306277970

alanwreath•38m ago
This is spam - btw this is the first spam I have ever come across on hacker news
akshaykarthik•37m ago
I think this was likely an attempted response to https://news.ycombinator.com/item?id=48008326
alanwreath•35m ago
Yes - that’s got to be it.
electroly•31m ago
FWIW, if you turn on "showdead", there is a ton of spam on HN. The mods are just really good.
coreylane•23m ago
I used ansible for years and pyinfra is very approachable since it has similar concepts, like inventories, common operations like files.put, server.shell, loving it so far, and it is quite fast
subhobroto•21m ago
Congrats on shipping 3.8.0!

If you're a software engineer who wants to setup and maintain infrastructure, give PyInfra and Pulumi a go!

Huge fan of PyInfra. For my homelab, I use Pulumi with Python and PyInfra to build fully declarative intent based infrastructure. You can use actual software engineering principles like composition, inheritance, DI to setup and wire your infrastructure and services. One of the benefits of this is your infrastructure and services are now self documenting (have them write out a mermaid diagram!)

Instead of Pulumi, I originally used Terraform CDK with Python before CDK got IBM'd. The migration to Pulumi was refreshingly painless. My original reason for not choosing Pulumi was the crippled state of the open source, self hosted backend support a decade ago but it looks like that is now way more mature and less crippled.

PyInfra is a breath of fresh air compared to Ansible - its not just fast, it's more Pythonic, so IDE features actually work, readable, maintainable, debuggable. I call it infrastructure for software engineers.

If anyone wants to use an AI agent to try out PyInfra - One issue I've faced is that PyInfra was rearchitected in v2 (and some more in v3?) but what belongs in v1 vs v2 vs v3 isn't very clear, so an AI agent could spend a lot of time writing v1 code, having it fail and iterate to v2 and then to v3.

The official site uses the version in the URL as the namespace but it seems like the SOTA AI agents don't pay much attention to that.

Maybe writing a llms.txt for PyInfra v2, or v3 would be an extremely useful task to help with onboarding newcomers?

---

The original post by the OP https://news.ycombinator.com/user?id=wowi42:

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:

    from pyinfra.operations import apt, files, server

    apt.packages(packages=["nginx"], update=True)
    files.template(src="nginx.conf.j2", dest="/etc/nginx/nginx.conf")
    server.service(service="nginx", running=True, enabled=True)
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.

eb0la•9m ago
This reminds me of Nortel Command Console back in 2000-2005!

I worked for a telco company that had a lot of Nortel Passport devices (does anyone know what Frame Relay is?). We started changing the network from Nortel to Cisco. Cisco used telnet (later SSH), but Nortel people were extremelly reluctant to switch.

Turns out the Nortel network managment system (nortel nms) had a very interesting feature: you could open the command console to connect to one of the passport devices... or you could connect to a device group (or all the network) and run the same command in all devices.

This was great for auditing which version had every single device in the network... or for changing access-lists globally.

Systems Are Visual – This Is a Better Way to Write Them

https://toolkit.whysonil.dev/lab-notebook/
3•otterwilde2•1m ago•0 comments

Vitexec – allow agents to test Vite apps through injected code

https://www.youtube.com/watch?v=yhIOSjp6pqs
1•BelaBohlender•2m ago•0 comments

They Left Receipts: Inside Charming Kitten's Crypto Procurement Network

https://caudena.com/charming-kitten-crypto-procurement-network/
2•caudena•4m ago•0 comments

8 in 10 Chatbots Inclined to Assist Users in Planning Attacks

https://www.statista.com/chart/36156/instances-where-chatbots-assisted-users-plan-a-violent-attack/
2•laurex•4m ago•0 comments

AI evals are becoming the new compute bottleneck

https://huggingface.co/blog/evaleval/eval-costs-bottleneck
2•gmays•6m ago•0 comments

Tera – System for structuring and testing complex ideas

https://github.com/Yggdrasilcsui/TERA/discussions/1�
2•Yggdrasilcsui•8m ago•0 comments

Ask HN: What's your favorite tech talk?

1•downbad_•9m ago•1 comments

Are you just an .md file?

https://deathbyclawd.com
1•laurex•10m ago•0 comments

When 'if' slows you down, avoid it

https://easylang.online/blog/branchless
1•birdculture•10m ago•0 comments

Cisco Announces End of Life for Smartlook

https://www.uxwizz.com/blog/smartlook-shutting-down
1•XCSme•10m ago•1 comments

Codex pets now work in Claude Code

https://github.com/danielkempe/clawdex
1•danielkempe•11m ago•1 comments

Computer Science, Software Engineering, and Vibe Coding

https://compsciforvibing.substack.com/p/computer-science-software-engineering
1•ingve•11m ago•0 comments

Poll: Midterms' new big players pushing agendas that voters don't support

https://www.politico.com/news/2026/05/03/poll-ai-crypto-super-pacs-voter-skepticism-midterms-0090...
1•1vuio0pswjnm7•12m ago•0 comments

Need Some Testers

1•kvthweatt•13m ago•1 comments

AI systems are about to start building themselves

https://importai.substack.com/p/import-ai-455-automating-ai-research
2•momentmaker•14m ago•0 comments

Chinese court rules companies can't fire workers just because AI is cheaper

https://www.tomshardware.com/tech-industry/artificial-intelligence/chinese-court-rules-companies-...
3•Imustaskforhelp•14m ago•0 comments

New Mexico seeks restrictions on Meta apps and algorithms in trial's 2nd phase

https://apnews.com/article/meta-new-mexico-social-media-child-safety-0ee254c8e8b37c9c28cea591d661...
1•1vuio0pswjnm7•15m ago•0 comments

Building GitHub Canarytokens: A rant about Audit Log gaps

https://blog.bored.engineer/github-canarytokens-5c9e36ad7ecf?source=friends_link&sk=57cd6a6d5c191...
1•innoying•16m ago•0 comments

Where to buy a non-Apple, non-Google smartphone

https://www.theregister.com/2026/05/01/buy_a_foss_fondleslab/
1•fsflover•17m ago•1 comments

Grasping at the Future of Programming Languages

https://ideasthetician.substack.com/p/grasping-at-the-future-of-programming
2•totemandtoken•17m ago•1 comments

Reminder: Backup Your Blog

https://forkingmad.blog/backup-blog/
2•speckx•18m ago•0 comments

Windows' Default Browser Protection (2025)

https://binary.ninja/2025/03/25/default-browser-upcd.html
1•d3nit•18m ago•0 comments

How (and why) we rewrote our production C++ front end infrastructure in Rust

https://blog.nearlyfreespeech.net/2026/04/17/how-and-why-we-rewrote-our-production-c-frontend-inf...
1•blakewatson•19m ago•0 comments

Ask HN: Is a hands-off, family-friendly, de-Googled "home lab" feasible?

1•strix_varius•19m ago•2 comments

Redis array: short story of a long development process

https://antirez.com/news/164
2•antirez•20m ago•0 comments

Show HN: Rudel – Claude Code / Codex sessions reveals 9 types of AI coder

https://app.rudel.ai/wrapped
3•keks0r•21m ago•0 comments

The Cabinet of Wonders

https://github.com/cloudstreet-dev/The-Cabinet-of-Wonders
1•DavidCanHelp•21m ago•0 comments

Retraction Note: The effect of ChatGPT on students' learning performance

https://www.nature.com/articles/s41599-026-07310-z
1•speckx•22m ago•0 comments

Parachuting In

https://www.kevinlondon.com/2026/04/15/parachuting-in/
1•Kaedon•23m ago•0 comments

FDA Announces Major Steps to Implement Real-Time Clinical Trials

https://www.fda.gov/news-events/press-announcements/fda-announces-major-steps-implement-real-time...
2•debo_•24m ago•0 comments