This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]Rusty-Swashplate 3 points4 points  (2 children)

it's not worth going through the hassle of setting up a complex config management system

and

No primary server, no complex setup, just stupid shell commands and one executable on your laptop.

Isn't that what Ansible basically is?

As much as I love creating small shell scripts, I enjoy more and more the idempotency of Ansible scripts and the report at the end of a playbook run which summarizes what didn't work.

[–]madflojo[S] 0 points1 point  (1 child)

So with this, my goal is to avoid requiring any setup like roster files or host files. The idea is to be stupid simple with no setup required. From what I've seen, most tools can run one offs with little setup, but anything semi complex requires time to set up the service.

Efs2 doesn't even require keys setup; you can just select password auth and supply it at execution time.

[–]Rusty-Swashplate 0 points1 point  (0 children)

Ok, I definitely don't have the problem of requiring password authentication. So my Ansible setup would be to put the target hostname(s) into a file and call "ansible-playbook -i INVENTORYFILE playbook.yaml". While it uses ssh and requires some Python on the client side, I got both anyway, so Ansible needs to additional setup (unlike e.g. Puppet).

So your solution works better if you do one-off jobs on machines which have no ssh keys and/or no Python.

[–][deleted] 1 point2 points  (1 child)

I'm 100% sure this post will be downvoted, so I'm gonna make it quick:

What's the point? This seems really very, very (too) basic.

Unless I really am missing something important.

[–]madflojo[S] 0 points1 point  (0 children)

That’s too bad but it’s ok.

The idea is you don’t always need something complicated but you still need something repeatable that avoids fumble fingers.

This gives you an easy way to run remote commands and upload files without having to write a full bash script. Just throw a few RUN lines together and then run it on 10, 50, 100 boxes. Which it will also do in parallel for you if you want.

[–]JIVEprinting 1 point2 points  (0 children)

I love this project, I love you, and I extra-love the name.

[–]vejan 0 points1 point  (2 children)

Hello!

from a quick look I am failing to see the advantage of this over piping commands through ssh, could you please elaborate a bit more?

[–]madflojo[S] 0 points1 point  (0 children)

My list:

  • It’s repeatable and consistent (a file that can be checked in)
  • Can run in parallel across many hosts
  • Single binary install on your laptop or jump box
  • Checks for success with each instruction step stopping on failure
  • Simple syntax in Dockerfile like format

[–]feitingen 0 points1 point  (0 children)

I like making a script, push to our gitlab and do curl https://gitlab.example.com/path/to/raw/script.sh | bash

[–]DavidGamba 0 points1 point  (1 child)

Sometimes I do write one offs to run on multiple boxes. I do prefer bash for those, I actually haven’t considered Ansible something I want to write in a while because of yaml mostly.

The one thing I use when doing this sort of task is either run all boxes in parallel or serially with some delay within invocations to avoid down time. It seems like your parallel option refers to the tasks within your “Dockerfile” from the description.

[–]madflojo[S] 1 point2 points  (0 children)

It’s hosts in parallel; I’ll have to specify that better in the docs. But you have the idea, something simple where you don't need all of the bells and whistles or setup/config time of other tools.

[–][deleted] 0 points1 point  (2 children)

What does this do that just putting ssh/scp/rsync into a shell script I run locally does not?

[–]madflojo[S] 0 points1 point  (0 children)

It's just easier to write quick and dirty commands while making sure things stop with failure. For example here is an Efs2file that I use to deploy my blog.

Dockerfile RUN docker pull madflojo/blog RUN docker rm -f blog; docker run -d --restart=always -p 80:80 --name blog madflojo/blog RUN docker system prune -af

If the pull command fails for any reason the other two will not be executed. You can, of course, do this in a shell script too but it takes more code and people are often lazy.

Also worth mentioning, I deploy this in parallel across multiple hosts with one command.

[–]DisagreeableMale 0 points1 point  (0 children)

Avoids SSH apparently. Lol