Finish templates with external hosts

Hi,

Is there any known way to have foreman install a host using a finish
template even though the actual compute resource isn't managed by foreman?

ie. In case scenario when OS is already installed on a bare metal host
New Host --> Define IP, username and password (if no SSH key) --> finish
template --> check into puppet

I tried to do this as a bare metal provision, but that seems to be locked
to requiring a provision template in build mode.

Any ideas would be much appreciated,

Cheers!

No, there's no way to do that workflow today. The closest would be to
define a bare-metal host in Foreman, put it in build mode, and then
log into the host yourself and download the finish script and execute
it by hand. There's an example on the blog[1] of doing that for a
grub-rewriting script (handy if you need to rebuild with PXE :P) which
could be re-purposed to finish scripts - but it's still manual.

Greg

[1] http://blog.theforeman.org/2012/01/re-provision-host-without-pxeboot.html

··· On 4 December 2014 at 01:10, Andrew Lau wrote: > Hi, > > Is there any known way to have foreman install a host using a finish > template even though the actual compute resource isn't managed by foreman? > > ie. In case scenario when OS is already installed on a bare metal host > New Host --> Define IP, username and password (if no SSH key) --> finish > template --> check into puppet

Thanks for that, I've been doing something very similar to that with
finish templates and compute providers that didn't have custom image
support.
Guess this one will have to be done manually, thanks!

··· On Thu, Dec 4, 2014 at 9:35 PM, Greg Sutcliffe wrote: > On 4 December 2014 at 01:10, Andrew Lau wrote: >> Hi, >> >> Is there any known way to have foreman install a host using a finish >> template even though the actual compute resource isn't managed by foreman? >> >> ie. In case scenario when OS is already installed on a bare metal host >> New Host --> Define IP, username and password (if no SSH key) --> finish >> template --> check into puppet > > No, there's no way to do that workflow today. The closest would be to > define a bare-metal host in Foreman, put it in build mode, and then > log into the host yourself and download the finish script and execute > it by hand. There's an example on the blog[1] of doing that for a > grub-rewriting script (handy if you need to rebuild with PXE :P) which > could be re-purposed to finish scripts - but it's still manual. > > Greg > > [1] http://blog.theforeman.org/2012/01/re-provision-host-without-pxeboot.html > > -- > 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/bsF_ozGgsTw/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 http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.

TBH, I think (re)provisioning a host with a given auth method is a
valid feature request - care to raise one?

Greg

Sure, I've opened this issue here Feature #8604: (Re)provisioning a pre-installed host - Foreman

··· On Sat, Dec 6, 2014 at 4:37 AM, Greg Sutcliffe wrote: > TBH, I think (re)provisioning a host with a given auth method is a > valid feature request - care to raise one? > > Greg > > -- > 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/bsF_ozGgsTw/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 http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.