Blueprint node names in Morpheus variables

I have created an app blueprint in Morpheus with two VMs. There is an Ansible workflow configured only for the second VM. I have created a catalog where there are few input fields for the blueprint and is required by the Workflow. The name for the VMs have a naming policy which appends the input of value for the vm’s name with the values of “customOptions.platform” and another input.

I tried sending the naming policy completely but in Morpheus variables of customOptions I am getting everything including padding and other conditions.

So my question is, is it possible to assign and send the naming policy to one of input fields?
If yes, then how
Or
Is there any Morpheus variable to access the names of VMs configured in a blueprint
Something like
Morpheus[“appblueprint”][“vm1”][“name”]

Hi @Phone_Bic,

So a few things:

You should be able to use the naming policy within the YAML / JSON config of the catalog natively. So find the line items for name and hostname for your VMs and you can just populate a standard naming policy. (If you generated the config with a naming policy applied this should already be captured.

I typically have something like:

"hostName":"${userInitials}-${type}-${sequence+1000}"
"name":"${userInitials}-${type}-${sequence+1000}"

If you are looking to use a customOption in the naming, you would add it like:

"hostName":"${customOptions.fieldName}${userInitials}-${type}-${sequence+1000}"

You may have to also map that customOptions within each VMs config.customOptions payload like so:
image

As for your other ask, application data is under the instance.apps.[]

If you echo out just <%=instance.apps.encodeAsJson().toString()%> you should be able to see all of the accessible data.

For more variable information, please refer here

Thank you so much for the response

I am able to assign the policy for name and hostname. The issue is I need to send the processed name to the ansible workflow.
The naming policy goes something like this
A-<%= customOptions.name %>VM-${sequence.toString().padLeft(3,‘0’)}

I am unable to grasp much from the screenshot you provided. As far as the variables go
I tried printing Morpheus[‘instance’][‘apps’]
But that is providing with a big json which is very similar to printing (Morpheus)

Or is there a way to pass ${sequence.toString().padLeft(3,‘0’)} to the wf in backend.
The following is my app blueprint. Please let me know if you need any more details from my side