我需要在Fabric任務中動態設置主機env。 我已經試過這樣: env.hosts = ['%s'] % server_ip_var
但我得到這個錯誤: Class 'list' does not define 'mod', so the '%' operator cannot be used on its instances less... This inspection detects
我有我我的晶圓廠文件, 幾臺服務器,我想有一個會提示我做什麼,不是所有的服務器上執行它的功能。 def simple():
actions = prompt('Type the actions: ')
run(actions)
現在,當我這樣做,我得到: [web1] Type the actions:
bla bla bla
[web2] Type the