Custom service dialog variable to be used in customization template


#1

Hi, I’m investigating how the object model in MIQ works. Can anybody please just very shortly advice me how the custom service dialog variable can be used in cloudinit customization template? I.E. asking users for ssh-key and placing it in authorized_keys of all VMs provisioned by service. I just can’t get this done for hours.


#2

@gmccullough @bdunne Would you please respond?


#3

@opsourcetrail You will want your service to use the CatalogItemInitialization as the Service Provisioning entry point into automate which will pass dialog values down to the provisioning tasks. Then the cloud-init template can resolve the value using the “evm[<key_name>]” syntax.

However, I think you might be running into the issue resolved in PR #3052 (Fix issue where options were not getting set properly on the provision task.)

https://github.com/ManageIQ/manageiq/pull/3052

Try copying the CatalogItemInitialization method in automate to a new domain and apply to two line changes from that PR.


#4

Hi @gmccullough, thanks for the advice. We’ll chack that out and will let you know.


#5

Hello, this has helped! Thanks a lot.

Best regards,
Jan


#6

Hi,

Thanks so much for this - it helped me a lot!

Rotty