def get_external_ip(int_ip):
@hosts(int_ip)
def _get_external_ip():
ext_ip = run('''curl -s ip.cn |awk '{split($2,x,"?");print x[2]}' ''')
return ext_ip
ret_value = execute(_get_external_ip)[int_ip]
return ret_value
评论列表
文章目录