[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] Intercepting host connections to check access
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] Intercepting host connections to check access |
Date: |
Mon, 20 May 2013 17:18:54 -0700 |
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 <address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user
>
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org