[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] combining multiple tasks on multiple targets into a singl
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] combining multiple tasks on multiple targets into a single function |
Date: |
Mon, 11 Jul 2011 13:35:52 -0700 |
On Mon, Jul 11, 2011 at 10:36 AM, Chris Steel <address@hidden> wrote:
> I want to be able to run a single fab command, for example:
>
> fab combined_task
>
> so that a number of tasks take place on various target hosts with no
> additional input required.
What you need to do:
* Use host_string instead of hosts. See the docs for a quick
explanation of how/why this works and env.hosts doesn't:
http://docs.fabfile.org/en/1.1.1/usage/library.html#connections
* The gist is that env.hosts only works when set *before* the task is
executed. Either at module level or by a non-remote-executing task run
on the CLI prior, e.g. "fab setup realtask".
What I need to do:
* Add this to the FAQ :)
-Jeff
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org