Hey, @kgaikwad pointed out on an interesting fact I am not able to resolve. Our template “Kickstart default finish” don’t have “call home” or it’s so hidden I am missing it. All other finish templated do have it, but “Kickstart default finish” don’t have it from the very beginning (54715f70fb1e62).
Can someone explain me how this is supposed to work? Maybe the puppet agent is supposed to flip build flag when new report comes in? Or do we have some code in Foreman core which flips the build flag back when finish template return zero?
Some references which I found while debugging this scenario:
In setSSHProvision, it calls client.deploy!and based on result it calls built method on host.
Inside deploy! method, it run command which contents exit $(cat #{remote_script}.status)
Guys, I have finally figured out why we have built calls in finish scripts. These are used both in image-based provisioning when Foreman scp them, however they are also used for Debian provisioning to “finish off” provisioning since debian installer does not allow arbitrary scripts (only short commands). Hence the name. The same applies for Free BSD. I don’t often test Debian or BSD therefore I was confused.