I want to use cloth in Python so that commands can be executed on remote server.
I have written:
but it does not work and logs me ..
This output is:
< Pre> ➜ ~ python test.py [root@10.18.103.102] Execute 'do_some_thing' [root@10.18.103.102] Run: ls -lh [root@10.18.103.102] Out: root @ svn: ~ # [Root @ 10.18.103.102] Out: Using Root @ svn: ~ #
Import the fabric.contrib.files from * env
variable -
Now call them in a file call Save fabfile.py
and execute (on the same directory) -
$ fab myserver ls
Perform both functions of the fabric After the second. Therefore, when it executes ls ()
, then there will be a description of the server in env
.
Comments
Post a Comment