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.

Requirements

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 commands:

$ cd stools-<version>
$ python setup.py install

Build

You can build stools distribution with:

$ python setup.py sdist

You can build documentation with:

$ cd doc ; make html

Documentation

Documentation can be find at:

Version Link
0.2 http://entrecode.fr/stools/
0.1 http://entrecode.fr/stools/0.1/

Bugs & Support

Bug Reports:Github

Example

_images/example1.png

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 = "get"
      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

Indices and tables