fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] running a different command for each host in one task


From: Morgan Goose
Subject: Re: [Fab-user] running a different command for each host in one task
Date: Fri, 11 May 2012 15:35:34 -0700

I'm going to jump on the thread only for the fact that I'm also a Morgan.

-goose

On Fri, May 11, 2012 at 12:16 PM, Comète <address@hidden> wrote:
> Hi,
>
> thanks to Jeff, Marcelo and Peter for the help ;)
>
> the answer was indeed to use "execute" as you told me and it works !
>
> Thanks again guys !
>
>
> Morgan
>
> Le 11-05-2012 19:54, Jeff Forcier a écrit :
>
>> Hi Morgan,
>>
>> You just need to use the execute() function, which allows you to run
>> any task/function on any host/list of hosts/etc. See:
>>
>>
>>
>>
>> http://docs.fabfile.org/en/1.4.2/usage/execution.html#intelligently-executing-tasks-with-execute
>>
>> It will even look at the @hosts decorators if you are using them, so
>> all you should have to do is change is_it_blocked() to:
>>
>>   address@hidden
>>    def is_it_blocked():
>>         """Verifie si un mail est bloqué sur firewall ou la
>> passerelle SMTP"""
>>        address = raw_input("Entrez l'adresse ou mot clé à rechercher: ")
>>        execute(ask_fw, address)
>>        execute(ask_smtp, address)
>>
>> HTH,
>> Jeff
>
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user



reply via email to

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