[root@node110 fabric]# cat fabfile.py
#!/usr/bin/env python
from fabric.api import run
def host_type():
run('uname -s')
结果:
[root@node110 fabric]# fab -H 192.168.2.120 host_type
[192.168.2.120] Executing task 'host_type'
[192.168.2.120] run: uname -s
[192.168.2.120] out: Linux
[192.168.2.120] out:
2017-04-10
fabfile.py
评论
发表评论
姓 名: