Skip running the finish template - image based

I found that provisioning a host using an image would block the hosts
create (API) until the finish template would finish executing. There isn't
much in my finish template so I can live without it. Is there a way to
inform foreman not to try to run any finish template and return immediately
after the host was created?

Hi, marking the image as supporting 'user_data' and using 'user_data'
instead of 'finish' template should do the trick.

– Ivan

··· On Sat, Apr 23, 2016 at 4:16 PM, ghidu wrote:

I found that provisioning a host using an image would block the hosts
create (API) until the finish template would finish executing. There isn’t
much in my finish template so I can live without it. Is there a way to
inform foreman not to try to run any finish template and return immediately
after the host was created?


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

No, but you could consider using a user data template instead if the
compute resource supports it. These are more asynchronous because the
host is left in build mode until the host calls the "built" URL.

This relies on cloud-init or another mechanism to either run the
template or at least call the URL.

··· On 23/04/16 15:16, ghidu wrote: > I found that provisioning a host using an image would block the hosts > create (API) until the finish template would finish executing. There > isn't much in my finish template so I can live without it. Is there a > way to inform foreman not to try to run any finish template and return > immediately after the host was created?


Dominic Cleal
dominic@cleal.org

I will give user_data a try. Would I still have to define a finish template
(looks like it mandatory in OS "Template" tab)
Thank you both

··· On Tue, Apr 26, 2016 at 12:27 PM, Dominic Cleal wrote:

On 23/04/16 15:16, ghidu wrote:

I found that provisioning a host using an image would block the hosts
create (API) until the finish template would finish executing. There
isn’t much in my finish template so I can live without it. Is there a
way to inform foreman not to try to run any finish template and return
immediately after the host was created?

No, but you could consider using a user data template instead if the
compute resource supports it. These are more asynchronous because the
host is left in build mode until the host calls the “built” URL.

This relies on cloud-init or another mechanism to either run the
template or at least call the URL.


Dominic Cleal
dominic@cleal.org


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/ER5Mtjd2KAA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Once the Image is set to user_data = true, Foreman should correctly require
you to specify a user_data template instead of a finish template.

I have both finish and user_data as mandatory templates in OS

··· On Wednesday, April 27, 2016 at 3:22:43 AM UTC+3, Greg Sutcliffe wrote: > > Once the Image is set to user_data = true, Foreman should correctly > require you to specify a user_data template instead of a finish template. >