Getting Network Details Using from an Instance Using Task

Hello,

I’m trying use a variable within an automation task using shell scrip <%=server.interfaces.network%> to get network information such as netmask, CIDR etc when I echo this variable, it returns some information and the rest are null.

I thought this was because I was my vCenter cloud, however I tested it in Azure and AWS too and received same result, and thinking if this null result was the result of using DHCP network ? or do have to define a static network information within Morpheus to return the null values or am I using the wrong variable? Any insight would be help.

Thanks.

I believe that variable is for information regarding the Morpheus network. For DHCP clients, we return the IP, but that’s about it, based on my limited testing.

You can execute ip -j a on the instance and use a result type of JSON to pass the result to the next task in a workflow. At that point, you can address any of the runtime network information:

1 Like

Thanks for your response, I’ll test this out.