95
you are viewing a single comment's thread
view the rest of the comments
[-] Cyber@feddit.uk 1 points 1 year ago

Ansible is an automation tool to setup systems to a known desirable end state.

TBH, for a single device, it's overkill, but you seem like someone who keeps good notes and has some custom files to copy across.... you could convert your setup note into an Ansible file, and it will also copy over your custom config files.

For Ansible you define the desired outcome and it does "all" (kinda) the work for you... so... say you want Apache, MariaDB and PHP, it doesn't matter if half are installed already, or not, or their dependencies - you just say:

Do an update Install packages: A B C Copy my config files over Start the services Relax

Yep, it'll take 10 times as long to get it working up front, but the day you want to duplicate it / start on a fresh Pi / VM, it's all there for you.

I use it to setup all my Pi Zeros thr same way (they're doing BLE presence detection) and for their regular updates

I've also got some VMs setup that way

But... I tried it on a laptop and as it's a single device I just ended up setting it up manually and now the ansible script is woefully out of date... just some balanced feedback.

[-] confusedpuppy@lemmy.dbzer0.com 1 points 1 year ago

Sounds like what I've been doing manually for a while now as I learn more. For my desktop I have three scripts. One to install Alpine on full disk encryption. One for the initial setup up to the first required reboot and the last for the remaining setup plus transferring files.

I've been learning how to edit files with sed, cat, echo and tee commands to help automate everything from a fresh install.

Similar process for my Pi's except I just copy-paste blocks of commands through a terminal instead of a script.

To transfer files to all their proper directories, I have a whole system for that using rsync. I basically keep a bare-bones directory tree with only the files I have worked on. Then I have an rsync command to send all those files onto the Pi's file system in a way that retains all the files and folder's attributes.

I wrote an rsync tool for myself to help me keep all these commands in files that I can neatly organize. I use that tool so much that it's now my entire backup system. With a bunch of files organized with numbers, I can automate the backup of my phone, two pi's and laptop to a partition on my laptop, then an additional copy to my external SSD in one command. And I have very high confidence in my restores since I do that frequently while testing new stuff. I also failed a lot before to get that much confidence.

I have issues with over organization if you couldn't tell by now hahaha.

this post was submitted on 10 Jul 2025
95 points (99.0% liked)

Selfhosted

63253 readers
419 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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

founded 3 years ago
MODERATORS