I gone from using shell scripts, a bit of perl, python or using tools like forge with puppet. I started using ansible in 2016 and that’s what I mostly been using since its my job lol. What tools do you use or options work better for you?
Whatever Stackoverflow answers use…
More seriously, I stick with what I know, which happens to be shell scripting for most self hosted needs and occasionally I’ll roll up my sleeves and crank out some python.
Mainly n8n, used to use a bunch of powershell or custom built web APIs.
I’ve now gotten rid of all of the powershell and custom web APIs and replaced with n8n entirely. Far more “user friendly” and much easier to configure etc. with lots of connectors already available OOB
Easy to setup and tons of integrates could be use.
I’ve been learning Ansible but I still didn’t get to use it a lot. For me it’s mostly bash scripts, python and node; I really prefer bash over any of the last two but in some cases python is just way easier
Bash scripts, and kinda related/kinda not related, for anything in the Microsoft suite learning Power Automate has been awesome.
Normally I’d use bash scripts and sometimes Python, but recently fell in love with Ruby for its inline Bundler mode (inline pip is what would make me go back). Example:
#!/usr/bin/env -S ruby -w # frozen_string_literal: true require 'bundler/inline' gemfile do source 'https://rubygems.org' gem 'dotenv' gem 'openid_connect', '~> 2.2.0' gem 'kubeclient', '~> 4.11.0' end require 'kubeclient' #...
This is how my small script that checks if all k8s batch jobs finished begins. Notice that all dependencies and their versions are specified in one file. Also, Ruby has an excellent
OptionParser class available out of the box. Everything else is usually one gem away.
Used Ansible a bit before but it usually justifies the effort if:
- you use it every day and can use it without constantly referring to the docs for even the simplest things, or
- you need to manage more than one server consistently, or
- there is a nice playbook you can rely on for the most part of the heavy lifting.
As for n8n, mentioned earlier in the thread, I find it of very limited use. The main problem is that it doesn’t have a good story for delta-workflows, e.g. when the API endpoint returns a list of something but you want to run some steps once per item. This would require fetching a list from the API, reading some persisted copy of a previous API response, doing a diff and executing an action only on the new/different items. Normally, it’s a trivial thing to do in a script, either using an on-disk JSON file or a simple SQLite DB. But n8n has no support (even in form of some basic building blocks) for this.