Transactions

Transactions are the main building blocks for tasks. You will use them to define what a task should do on the remote host. Every transaction will print a short summary of the changes it made to the remote. Below you will find a list of predefined transactions you can use.

Basic transactions

simple_automation.transactions.basic.directory(…)

Creates the given directory on the remote.

simple_automation.transactions.basic.directory_all(…)

Creates the given directories as if directory() was called for each of them.

simple_automation.transactions.basic.template(…)

Templates the given src file or given content and copies the output to the remote host at dst.

simple_automation.transactions.basic.template_all(…)

Templates each (src, dst) list entry, as if template() was called for each of them.

simple_automation.transactions.basic.copy(…)

Copies the given src file to the remote host at dst.

simple_automation.transactions.basic.copy_all(…)

Copies each (src, dst) list entry, as if copy() was called for each of them.

simple_automation.transactions.basic.save_output(…)

Saves the stdout of the given command on the remote host at remote dst.

simple_automation.transactions.basic.user(…)

Creates or modifies a unix user.

simple_automation.transactions.basic.group(…)

Creates or deletes a unix group.

Git transactions

simple_automation.transactions.git.checkout(…)

Checkout (and optionally update) the given git repository to dst.

simple_automation.transactions.git.clone(…)

Clone a git repository, without updating it, if it is already cloned.

Package transactions

By default, there is rudimentary support for installing packages via apt, pacman and portage.

simple_automation.transactions.package.apt.package(…)

Installs or uninstalls the given package name (depending on state == “present” or “absent”).

simple_automation.transactions.package.pacman.package(…)

Installs or uninstalls the given package name (depending on state == “present” or “absent”).

simple_automation.transactions.package.portage.package(…)

Installs or uninstalls the given package atom (depending on state == “present” or “absent”).