Created
August 22, 2011 20:09
-
-
Save gregglind/1163389 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class RoleHostsGenerator(object): | |
""" generator for the env.hosts dictionary""" | |
def __init__(self,hostfile=HOSTS_FILE): | |
self.hostfile=HOSTS_FILE | |
def __getitem__(self,key): | |
print self.hostfile | |
print key | |
l = list(_gethosts(key,open(self.hostfile))) | |
print l | |
return l | |
""" | |
165 gregg.lind ~/gits/commands $ fab -R web fake | |
/etc/hosts | |
0 | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment