bootstrap-vz/plugins/image_commands
Anders Ingemann a4ead02a9b Remove provider specific manifests
Manifest and module loading has been refactored
Provider modules now must implement validate_manifest like plugins do
Simplified loading of manifests
2014-01-05 14:03:04 +01:00
..
__init__.py Remove provider specific manifests 2014-01-05 14:03:04 +01:00
manifest-schema.json Fix image_commands and user_packages plugins 2013-12-14 23:18:39 +01:00
README.md fix call of ImageCommands, object should not be called, only class should be 2013-12-15 08:33:45 +01:00
tasks.py Minor import stmt and dependency fix 2014-01-05 02:25:29 +01:00

Image script plugin

This plugin gives the possibility to the user to execute commands.

Plugin is defined in the manifest file, plugin section with:

"image_commands": {
    "commands": [ [ "touch", "/var/www/index.html" ]],
}

The commands element is an array of commands. Each command is an array describing the executable and its arguments.

Command is executed in current context. It is possible to use variables to access the image or execute chroot commands in the image.

Available variables are: {root} : image mount point (to copy files for example or chroot commands)

Example:

[[ "touch", "{root}/var/www/hello" ],
[ "/usr/sbin/chroot", "{root}", "touch", "/var/www/hello"]]