Yet another fancy SSH loop to execute stuff on remote servers.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Buetow fc82a25e84 docs: add deprecation notice
Amp-Thread-ID: https://ampcode.com/threads/T-019cc858-2bdd-716d-8668-e1fb47137cf3
Co-authored-by: Amp <amp@ampcode.com>
2026-03-07 14:54:04 +02:00
LICENSE add license 2021-11-05 09:26:27 +02:00
README.md docs: add deprecation notice 2026-03-07 14:54:04 +02:00
rubyfy.json new default config options 2015-10-23 22:14:32 +01:00
rubyfy.rb can just opload af ile 2016-03-12 08:51:11 +00:00

⚠️ DEPRECATED: This project is no longer maintained. No further updates, bug fixes, or feature additions will be made. Use at your own risk.

Rubyfy

It's just a fancy SSH loop to execute stuff on remote servers.

Tested on

  • Fedora 22 / Ruby 2.2.3
  • Mac OS X / MacPorts Ruby 2.2.0

Example usage:

# Run command 'hostname' on server foo.example.com
./rubyfy.rb -c 'hostname' <<< foo.example.com

# Run command 'id' as root (via sudo) on all servers listed in the list file
# Do it on 10 servers in parallel
./rubyfy.rb --parallel 10 --root --command 'id' < serverlist.txt

# Run a fancy script in background on 50 servers in parallel
./rubyfy.rb -p 50 -r -b -c '/usr/local/scripts/fancy.zsh' < serverlist.txt

# Grep for specific process on both servers and write output to ./out/grep.txt
echo {foo,bar}.example.com | ./rubyfy.rb -p 10 -c 'pgrep -lf httpd' -n grep.txt

# Reboot server only if file /var/run/maintenance.lock does NOT exist!
echo foo.example.com |
./rubyfy.rb --root --command reboot --precondition /var/run/maintenance.lock