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:

    @task
    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

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org

_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to