#Ansible's decision to use Jinja in values only, and not render the YAML itself through Jinja (like Salt does) might make some things a bit more clean, but it also makes a _lot_ of things significantly more difficult. 😩

Hot take: Infrastructure as Code should mean actual _code_, not YAML.

Don't get me wrong: I'm one of the few people who actually like YAML. But trying to express actual _logic_ in YAML, like conditions, or value lookups, or loops, gets really messy really fast.

Just let me write my infrastructure in actual Python (or whatever). It can still be declarative, with all the state comparison and dependency resolving going on in the background.

But YAML is not the way.

@scy may i talk to you about our lord and saviour, https://docs.bundlewrap.org/?
BundleWrap

None

@kunsi Have you also tried pyinfra? It seems to be more popular than BundleWrap.

If you have some experience with both, I'd be very interested in your opinion on the pros and cons of both.

(Feel free to switch to German if you like.)

@scy No, never heard of pyinfra before. Since i'm a maintainer for bundlewrap, chances are low i'd switch over.

(Also, we use bundlewrap at work, so having common knowledge and being able to copy bundles over is nice)

@kunsi Oh, I didn't know you're a maintainer!

Well, I'm currently comparing the two and I'm still undecided.

The way it seems to me, compared to pyinfra, BundleWrap
• only works via SSH (pyinfra has "connectors" for Docker, chroot, local, etc.)
• requires passwordless sudo
• relies more on plain dicts instead of classes
• allows more explicit dependencies between actions
• does less magic
• appears to be even more bare-bones
• comes with helpers to compare desired and actual state

@scy I don't know what pyinfra supports, but your list seems about right.

@kunsi Not gonna lie, I'm kinda turned off by pyinfra using an example like `"rm -f {0}".format(name)` without quoting anything.

https://docs.pyinfra.com/en/3.x/api/operations.html#example-managing-files

(At least they're quoting it in the actual project source code.)

Also, using one operation's output in another operation is implemented in kind of a strange way:

https://docs.pyinfra.com/en/3.x/api/operations.html#example-managing-files

But, how would I pass information from one item to another at runtime in BundleWrap at all? Is that supported? Would it even make sense?

Writing Operations — pyinfra documentation

@scy i don't think that is supported, since that would mean an itrm is dependent on another items output.

What's your specific usecase?

@kunsi I â€¦ I'm not quite sure yet. I'll get back to you once I thought a bit more about this, I guess. Thanks!