Live data from Hacker News

Bashible: An Ansible-inspired deployment/automation tool written in Bash DSL

github.com

11–20 of 86 posts

Re: Bashible: An Ansible-inspired deployment/automation tool written in Bash DSL

#13
post #12

Portability is pretty important in the deployment/automation space and it's hard to beat bash in that capacity. It just sucks that bash sucks so much.

Ansible already is pretty portable/flexible on target systems (the joys of being agentless and working mostly over SSH). You tend to need python and sometimes some specific modules (python-apt, for instance) on the target, but that's hardly a burden.

Re: Bashible: An Ansible-inspired deployment/automation tool written in Bash DSL

#16
post #3

I’m surprised there’s no explanation of why Bash was chosen for this.

I'd imagine it's because it's available everywhere (even openwrt routers and those things), and it's easier to get away with not having to use sudo (depending on the task you are doing, of course). With Ansible, you almost always need python installed on the target host. Which, in 95% of cases is not a problem. It's not ideal to install a system package just because you want to do some provisioning (there are ways ar…

> it's available everywhere (even openwrt routers and those things)

BASH itself? Or a Bourne-family shell? I thought most embedded systems were shipping busybox's ash as /bin/sh

Re: Bashible: An Ansible-inspired deployment/automation tool written in Bash DSL

#17
post #8

Earlier quoted context omitted.

> complex logic encoded into YAML This should stop too.

What's the answer then?

Pulumi is the only imperative one I know about, but I can't really opine on any of them.

Except...

When we find a new problem, we solve it the way we always solve things. And we like to solve things with tons of impenetrable abstraction. We hardly care about legibility of stack traces let alone ease of tracing through the code.

I'm sure 24-year-old me would disagree with this, but I think there's a qualitative difference between an arcane abstraction for getting text onto a scroll area on a screen and arcane abstraction that lets me accidentally undeploy all of my servers (24 year old me would be equally frustrated by both).

BDD test frameworks mostly look like imperative code, and after the initial shock of learning that some things are declared/registered immediately and executed only after everything else has gotten a chance to register, it's not that difficult to figure out how things work (until you have to step into the internals, and some test frameworks are okay, while others are a disaster).

I kinda think infrastructure as code should just be code. Give me something that looks like a test framework but with better adherence to Least Surprise.

Re: Bashible: An Ansible-inspired deployment/automation tool written in Bash DSL

#18
post #7
post #6

No more DSLs for deployment/config management tasks please. Too many already.

I'd rather more DSLs than more things with complex logic encoded into YAML.

I'd argue that Ansible is using a DSL, just one that happens to be expressed in YAML. I mean, it has loops, conditionals, various forms of subroutines (roles, plays that can be included)... I don't think that using a YAML format rather than being C-shaped makes it any less a DSL.

Re: Bashible: An Ansible-inspired deployment/automation tool written in Bash DSL

#19
post #15

Are there any other Ansible alternatives that avoid the whole YAML mess?

Idempotency and reusability are what I like about Ansible. YAML is a dependency I could do without.

Maybe what we need is a set of CLI commands that mirror Ansible modules in performing idempotent operations through SSH and APIs.

Re: Bashible: An Ansible-inspired deployment/automation tool written in Bash DSL

#20
post #7

Earlier quoted context omitted.

I'd rather more DSLs than more things with complex logic encoded into YAML.

I'd argue that Ansible is using a DSL, just one that happens to be expressed in YAML. I mean, it has loops, conditionals, various forms of subroutines (roles, plays that can be included)... I don't think that using a YAML format rather than being C-shaped makes it any less a DSL.

The YAML syntax is awful for expressing those constructs though. It might be a DSL, but it's a very awkward one.
Post reply on HN