Created
September 26, 2012 09:20
-
-
Save drohr/3786979 to your computer and use it in GitHub Desktop.
get fabric role from ip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _get_role(ip): | |
role = [k for k, v in env.roledefs.iteritems() if ip in v] | |
return role[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment