this post was submitted on 31 May 2025
60 points (95.5% liked)

Selfhosted

46680 readers
403 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I have a few VMs and PMs around the house that I'd setup over time and I'd now like to rebuild some, not to mention just simplify the whole lot.

How the hell do I get from a working system to an equivalent ansible playbook without many (MANY) iterations of trial & error - and potentially destroying the running system??

Ducking around didn't really show much so I'm either missing a concept / keyword, or, no-one does this.

Pointers?

TIA

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 4 days ago (1 children)

@Cyber If you have some old wiki notes on how the system was setup originallythen it night be easier to ignore the current system and translate the wiki instructions into ansible. Still manual, but easier than reverse engineering. Another thing you can look at is bash history. Apart from backing up/cloning the system before you start I would also get a copy of the bash history for the various users and add it to a wiki or issue too. It will be useful.

[–] [email protected] 1 points 3 days ago (1 children)

Yeah... notes... they started about 50% of the way through building the system.

Now, my notes are great, but some of these devices are ~10 years old.

But, yep, I totally agree, notes are a damn good thing to have.

Not thought about bash history though, interesting point, but I think that only goes back a short duration?

[–] [email protected] 1 points 3 days ago (1 children)

@Cyber Yeah the bash defaults are incredibly limited by default, something like 1000 entries, 2000 bytes. I always make those something like 100,000 and 1MB. So the defaults can definitely bite you on an existing system, it may not have stored every command.
https://superuser.com/a/664061

[–] [email protected] 1 points 3 days ago

@Cyber Bash also seems to default to only writing out the history entries when you cleanly exit, so I've definitely got gaps in my history when I killed a terminal or SSH session. When I leave work I do a quick "history -a" to append new entries that haven't been written out yet. Some people modify their bash prompt so that it writes each entry out instantly which I haven't done, but I think it would be a saner default.