What’s the best way to manage Bash scripts across multiple servers?

0
10
Asked By CodeMaverick84 On

I'm interested in how other engineers manage useful Bash scripts, especially when they're used across multiple servers. Do you typically keep your scripts in a Git repository and pull from each host? Or do you have a different strategy, like copying them over manually? I'm looking for ways to centrally organize, version, and run repetitive Bash scripts without relying on configuration management tools like Ansible. Any suggestions or tools that work well for you?

4 Answers

Answered By NinjaDev92 On

I mount an NFS directory to all our virtual machines, where I store my scripts. This way, I can execute them easily from any VM using cron for automation.

Answered By TechWhiz77 On

Using a Git repo to develop and store your scripts is a great idea. You could even set up an installer script that you can curl or wget to quickly pull the latest version onto each server.

Answered By CyberSavvy11 On

At my workplace, we either keep scripts in a repository that gets rsync'd to all servers on changes, or we use Ansible for the initial setup, ensuring the scripts are deployed across all servers.

Answered By ScripterGal99 On

If you're steering clear of configuration management tools, you might want to explore using sftp and ssh for running commands remotely. Also, consider converting your Bash scripts into binary forms with shc, so they can't be altered after conversion.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.