This directory contains several common (but optional) Linux VM provisioning
snippets such as reboot
, ssh-authorized-keys
etc.
The snippets are synced into the base image by default, though they remain inactive. Thus, you must manually cherry pick and run them inside a VM provisioning stage.
There are several ways to call snippets:
-
Symlink them to your preferred stage's directory (e.g., generic layer's
install-stage2.d
) using your preparation script (vm-prepare.sh
). This makes the actual ordering of the stage scripts somewhat harder to understand... -
Create a dummy script sourcing the snippet, e.g.
32-ssh-authorized-keys
containing:vm_run_script "common-snippets.d/ssh-authorized-keys"
Check out the cloud layer or the official template for examples how to use them!