[0] https://github.com/olafal0/configinator
[1] https://github.com/olafal0/configinator/blob/0576a53970bcb4d...
[2] https://github.com/olafal0/configinator/blob/0576a53970bcb4d...
But people are actually being surprisingly nice and friendly! I guess people just really hate Splunk!
I hate this meme. It's as if cars, trains, and airplanes all use the same wheels. Or that wheels under my stove, my tiny filing dresser, and my shopping cart are all the same.
Oh yeah, re-inventing the wheel, what a stupid idea and something we obviously don't frequently do and for good reasons.
This meme is almost as bad as the horrible misquoted "premature optimisation is the root of all evil".
I'm currently using this for a small application to easily backup databases in docker containers.
Best things in life come through love and passion. Frustration can be a good motivator but don't let it guide you.
> I thought this would get a lot of hostile takes [...]
To be entirely honest with you, recognizing and praising the good parts is a lot easier than giving proper feedback on what needs to be improved;)
There's also a bunch of other purpose-built tiny utilities on that GitHub account: https://github.com/aaviator42?tab=repositories
You would think. But no, there is lots of room to make it over complicated without the corresponding efforts to manage the complexity.
The only systems I am aware of which are reliably capable of "solving for desired state" are nix and guix.
Ansible might provide idempotence for the builtin things (although I would argue it doesn't, at least not on a bit-by-bit level, since you can't pin down specific versions of package repositories and stuff like that), but to be declarative it would need to provide a 1-to-1 mapping from declared state to running system state. And if what I described above is still the case, then it simply does not do that.
In my experience, ansible tries to build a declarative interface to an imperative mode of system management, which works to some extent, but breaks down in more complex cases because building this declarative interface can only be a leaky abstraction without the right foundation.
To illustrate my point, imagine this playbook:
---
- name: Bring system into some state
hosts: localhost
tasks:
- name: Install hello
ansible.builtin.apt:
name: hello
become: true
Apply it and you get GNU hello installed. Now remove the package installation step, which really is just a glorified "ssh $host < script.sh": ---
- name: Bring system into some state
hosts: localhost
tasks:
Apply that and you will still have hello installed, even though it was removed from the "declared state". This just pretends to be declarative but really isn't, the tasks are still imperative steps.Not to blame ansible for this, it is just that ansible is build on a foundation that inherently makes declarative system management impossible to begin with and ansible is more or less the best thing you could do given the constraints.
When I first created Judo, I envisioned some sort of a standard library as a sibling project, sort of an "executable rosetta stone" for Unix, where you could declaratively say things like "ensure this user exists", "ensure this package is installed".
In practice I found out it's fairly easy to just write your scripts to be idempotent. It was the secret "2. and do not overcomplicate things" step that most initially simple software seems to gradually forget about.
Crystal Reports is a robust piece of software that lets you do whatever you want when it comes to designing a layout. for example, I used it to design the new high school report cards for the district. but it also lets you output to CSV instead of PDF, which allows other secretarial staff to use it in Excel, and do whatever they want with it, like filter for values and such. when designing a to-be-output-to-CSV report, you don't do anything design-wise but drag the columns from the SQL query in that you want to export.
I found this process to be very tedious, plus time-consuming to maintain—if you want to update a query or adjust which email addresses receive the report, you have to make a bajillion clicks. so, I made a simple PowerShell script on one of our servers, which looks in a Rules folder, which contains subfolders of arbitrary depth, and, at the end, has a SQL file and a config file. the config file contains the schedule (daily, weekly, monthly), and the list of email addresses who should receive the report. the script takes a parameter for which schedule it's going to run, and Task Scheduler tasks are set up to run each different parameterized version of the script daily, weekly, and monthly. the script looks at all the Rules, determines which ones it should evaluate, evaluates them, saves the results to a CSV file, and emails them to the relevant staff. updating a "rule" is as easy as modifying either the SQL file or the config file. adding a new rules is as easy as making a new subfolder, and making a SQL and config file. the script has a parameter to do a "dry run", outputting the results in table form to the console, without sending an email. (though, for now, I still have to test the queries in SQL Server Management Studio first, because I can't figure out how to get Invoke-Sqlcmd to output linked server errors.)
this has been a huge boon for productivity and maintainability of CSV reports, allowing myself and my coworkers to easily create and manage these "data validation rules", such that our data analysts and HR people can get periodic updates on all sorts of various data validation issues, without having to do things the complicated Skyward way—and all it took was about a day of work setting up and testing the PowerShell script.
this is just one of many such PowerShell scripts I've written to automate things at work—PowerShell is great. I didn't know how to use it before taking this job, and none of my coworkers did, either. but for simple stuff like this, it's fantastic.
I encourage everyone to share your "splunk in 1kloc of Python" projects! Some of my own:
- https://github.com/rollcat/judo is Ansible without Python or YAML
- https://github.com/rollcat/zfs-autosnap manages rolling ZFS snapshots