Skip to content

Commit

Permalink
Apply feedback to custom provisioning templates
Browse files Browse the repository at this point in the history
  • Loading branch information
maximiliankolb committed Jul 26, 2024
1 parent 77ec4a2 commit d27f32a
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
[id="Creating_Custom_Provisioning_Snippets_{context}"]
= Creating custom provisioning snippets

Custom provisioning snippets allow you to execute custom code during host provisioning.
You can run code before and/or after the provisioning process.
You can execute custom code before and/or after the host provisioning process.

.Prerequisites
* Depending on your provisioning template, multiple custom snippet hooks exist which you can use to include custom provisioning snippets.
Ensure that you check your provisioning template first to verify which custom snippets you can use.
Check your provisioning template first to verify which custom snippets you can use.

.Procedure
. In the {ProjectWebUI}, navigate to *Hosts* > *Templates* > *Provisioning Templates* and click *Create Template*.
. In the *Name* field, enter a name for your custom provisioning snippet.
The name has to start with the name of a provisioning template that supports including custom provisioning snippets:
** Append ` custom pre` to the name of a provisioning template to run code before provisioning a host.
** Append ` custom post` to the name of a provisioning template to run code after provisioning a host.
The name must start with the name of a provisioning template that supports including custom provisioning snippets:
** Append `custom pre` to the name of a provisioning template to run code before provisioning a host.
** Append `custom post` to the name of a provisioning template to run code after provisioning a host.
. On the *Type* tab, select *Snippet*.
. Click *Submit* to create your custom provisioning snippet.

[id="cli-Creating_Custom_Provisioning_Snippets_{context}"]
.CLI procedure
. Before you create a template with the CLI, create a plain text file that contains your custom snippet.
. Create a plain text file that contains your custom snippet.
. Create the template using `hammer`:
+
[options="nowrap" subs="+quotes"]
Expand Down

0 comments on commit d27f32a

Please sign in to comment.