下面是我的工厂文件。
env.hosts = ['111.111.111.111']
env.user = "root"
env.key_filename = "/home/ubuntu/.ssh/id_rsa"
def chef():
run('mkdir -p /home/ubuntu/')]
如何将主机作为参数传递,以便可以这样调用?
fab test host=111.111.111.111
env.hosts = [host]
env.user = "root"
env.key_filename = "/home/ubuntu/.ssh/id_rsa"
def chef():
run('mkdir -p /home/ubuntu/')]