I have one question to the VMware notes section in the current Foreman doc: If I make the adjustments for SSH-less configuration (using user-data template), how does Foreman/VMware apply the user-data template to the freshly created VM?
I found an interesting sequence diagram that visualizes how the image based approach works, but it doesn’t reflect the non-ssh way - atleast I don’t understand it.
There are a lot of topics regarding user-data templates and non-SSH deployment, though none fully cleared my misunderstanding. Apologies in advance if I add to the stack unnecessarily
Riiight, I coul’ve tried this on my own, thanks again.
One more question if you don’t mind: It seems Foreman searches for hosts using the requests IP even though the X-FORWARDED-FOR header is applied. Does the command work for you?
curl -D -verbose -H 'X-FORWARDED-FOR: 10.35.147.110' http://v000398/userdata/user-data
Could not find host for request 10.51.6.160
2019-11-22T15:15:07 [I|app|a4951657] Started GET "/userdata/user-data" for 10.51.6.160 at 2019-11-22 15:15:07 +0000
2019-11-22T15:15:07 [I|app|a4951657] Processing by UserdataController#userdata as TEXT
2019-11-22T15:15:07 [E|app|a4951657] Could not find host for request *10.51.6.160*
2019-11-22T15:15:07 [I|app|a4951657] Rendering text template
2019-11-22T15:15:07 [I|app|a4951657] Rendered text template (0.0ms)
2019-11-22T15:15:07 [I|app|a4951657] Filter chain halted as :find_host rendered or redirected
2019-11-22T15:15:07 [I|app|a4951657] Completed 404 Not Found in 16ms (Views: 0.5ms | ActiveRecord: 7.1ms)
After I removed the 50-cloud-init.yaml file and rebootet, the VM used the remaining netplan file to configure the interface. I created a new template based on that change and redeployed a test VM. Result: All good now.