bootstrap-vz/bootstrapvz/plugins/image_commands
2015-05-02 12:33:11 +02:00
..
__init__.py Convert every JSON file to YAML 2014-07-09 23:17:04 +02:00
manifest-schema.yml Convert every JSON file to YAML 2014-07-09 23:17:04 +02:00
README.rst Fix #32: Extend image_commands docs 2015-05-02 12:30:58 +02:00
tasks.py Fix #204, user_modification phase has been introduced 2015-05-02 12:31:06 +02:00

Image commands
--------------

The image commands plugin allows you to run arbitrary commands during
the bootstrap process. The commands are run at an indeterminate point
*after* packages have been installed, but *before* the volume has been
unmounted.

Settings
~~~~~~~~

-  ``commands``: A list of lists containing strings. Each top-level item
   is a single command, while the strings inside each list comprise
   parts of a command. This allows for proper shell argument escaping.
   To circumvent escaping, simply put the entire command in a single
   string, the command will additionally be evaluated in a shell
   (e.g. globbing will work).
   In addition to the manifest variables ``{root}`` is also available.
   It points at the root of the image volume.
   ``required``
   ``manifest vars``

Example
~~~~~~~

Create an empty `index.html` in `/var/www` and delete all locales except english.
.. code:: yaml

  image_commands:
      commands:
        - [touch, '{root}/var/www/index.html']
        - ['rm -rf /usr/share/locale/[^en]*']