我有一个文件
env.hosts = [
# huge list, 80 hostnames
]
def dm():
with cd('/home/project/application'):
# how to get the actual hostname here, so I can run certain commands depending on hostname?
有什么想法吗? fabric 文档对此一无所知
请您参考如下方法:
您可以使用 env.host 访问主机名.
