fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] How to set config when using fabric "programmatically"?


From: Heikki Toivonen
Subject: [Fab-user] How to set config when using fabric "programmatically"?
Date: Wed, 04 Mar 2009 16:39:58 -0800
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Now I've noticed that there is a bug in 0.8.0 when trying to install
things on multiple target machines. I upgraded to Fabric 0.1.0 and
noticed a function I was using is no longer there.

I need to run different commands on different machines, so I tried the
following simplified example:

    for hostname in ['host-a', 'host-b']:
        fabric.set(fab_hosts=[hostname], fab_user=username,
                   fab_password=password, fab_fail='abort')
        fabric.run('uname -a')

In 0.8.0 it runs, but actually runs the command twice on host-a, and
does not connect to host-b at all. In 0.1.0 the function set has been
removed so it raises an exception.

How can I make this work, ideally in a way that would not break with new
versions of Fabric?

-- 
  Heikki Toivonen

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]