Hi Neilen,

There's no callbacks of that sort right now, though you can always
check the "current" target by testing the value of env.host_string -
anytime that changes you'll be looking at a new host.

So you can probably get most of the way there with a "guard"
task/subroutine/whatever that runs before the code that does real work
& prints/prompts/compares against previous values of
env.host_string/etc.

Best,
Jeff



On Mon, May 20, 2013 at 9:49 AM, Neilen Marais <[email protected]> wrote:
> Hi,
>
> I've cooked up a custom host-database that we use to deploy or systems, with
> custom lookups for groups of hosts to execute on. Trouble is, a bit of
> finger trouble could have you running destructive scripts against production
> servers.
>
> Is there a robust way to get a callback or something similar every time the
> fabric host changes? Then I could check in my host database if this is a
> production server or not, and add an extra confirmation step?
>
> Thanks
> Neilen
>
> _______________________________________________
> Fab-user mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/fab-user
>



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