Fabric: a System Administrator's Best Friend



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Running arbitrary command trick

Athmane's picture

Fabric can be used to run arbitrary command with:

fab -u username -H hostname -- 'uname -a'


symbian's picture

iam enjoyed and like this

I usually just do something

jbowen7's picture

I usually just do something like the following:

for i in $SERVER1 $SERVER2 $SERVER3; do
scp myTasks.sh root@$i:/tmp
ssh root@$i '/bin/bash /tmp/myTasks.sh ; [[ $? != 0 ]] && echo "stuff broke" || rm -f /tmp/myTasks.sh'

Good content, I trust this is

Jiad's picture

Good content, I trust this is a good weblog about Wish to see refreshing content material next time. Thanks for sharing this publish with us. Keep it up.voyance gratuitement

A good alternative

Anonymous's picture

I've started using 'Salt' for this purpose. It handles all the rsa key authentication automatically, allows for remote execution of scripts, and also, offers a higher level configuration management system.

hello !!!

linda99's picture

Hi everyone your site is great, it is comprehensive and super attractive! your little presentation is very nice! Good luck on my part!
Avenir amour

Perl alternative

Anonymous's picture

There is a similar Perl alternative around, which I prefer for such tasks, as the Perl syntax is just simpler. It's called (R)?ex or just "Rex".


Nice, thanks for the tip.

anti ddos's picture

Nice, thanks for the tip. Looks interesting.

Another Approach To This Problem

A. Coder's picture

I wrote something along these lines some time ago, but packaged it as a turnkey utility:


Another Approach To The Same Problem

A, Coder's picture

Something I wrote along the same lines but more
as a turnkey utility:



JonnoN's picture

Been using pssh for quite a while to do just this!


And since I'm using Bash to execute items, I can combine it with any arbitrary Bash code to make robust, complex, elegant applications for deployment or administration tasks. :)

Better tool available

Anonymous's picture

I have found CSSH (Cluster SSH) to do this task quite well. Plus it sounds a lot more simple to use.


Anonymous's picture

Hello there.

I believe that almost every linux admin has done something like that tool-set on his/hers career. Either with python, ruby, or (k,z,c,ba,)sh script...

But what I find good about this is that it's not being kept closed in a "box". :)

Good job, and thank you for doing this.



One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix