stools¶
Description: | Tools for automate tasks on machines with only ssh |
---|---|
License: | GPL |
Homepage: | http://entrecode.fr/stools/ |
Development: | https://github.com/bth/stools |
What¶
“stools” is a module for Python 2.6+ that help you to automate tasks on machines across network.
It is written entirely in Python.
Installing¶
The recommended way to get stools is to download archive file and install with pip:
$ pip install stools-<version>.tar.gz
An alternative way is to extract archive:
$ tar xvvf stools-<version>.tar.gz
Then, execute this command:
$ cd stools-<version>
$ python setup.py install
Example¶

For example, if you use build as a build machine, you can create a
stools configuration file (~/.stools/configuration.cfg
on my-pc) like this:
[machines]
[[my-pc]]
ip = 192.168.1.1
username = login
password = passwd
[[build]]
ip = 192.168.1.2
username = login
password = passwd
[tasks]
[[build]]
[[[update_and_build]]]
machine = "build"
command = "cd source_code_directory ; git pull ; make"
[[[get_bin]]]
type = "recovery"
machine_source = "build"
machine_target = "my-pc"
file_source = "source_code_directory/bin"
file_target = "~/bin"
On my-pc you can execute this task by using:
$ stools -e build
Use¶
For list all configured tasks, you can do:
$ stools
By default, stools search config file as ~/.stools/configuration.cfg but you can specify where is your configuration file by using:
$ stools -c /my_path/my_configuration.cfg
You can execute a task my_task by using:
$ stools -e my_task