I want to pass the network gateway of a given cloud network to an Ansible playbook, but I'm having difficulties to reference it. What I'm trying to do in the blueprint:
resources:
ans_server1:
type: Cloud.Ansible
properties:
host: '${resource.server1.*}'
osType: linux
account: myansible
username: ansible-remote
privateKeyFile: .ssh/id_rsa_ansible
playbooks:
provision:
- playbooks/config.yml
hostVariables:
hostname: '${resource.server1.resourceName}'
gw: '${resource.Cloud_Network.gateway}'
clustername: '${input.clusterName}'
Cloud_Network:
type: Cloud.vSphere.Network
properties:
networkType: existing
name: cloud1
However, I get null for the gateway in vra_user_host_vars.yml:
{"hostname":"server-04","gw":"null","clustername":"clu1"}
The gateway information is correctly set in the network profile.
I figured out, the correct property name is ${resource.Cloud_Network.gatewayAddress}, as seen in the deployment topology after a successful request completion:
The documentation is wrong:
Code completion is also wrong:
I figured out, the correct property name is ${resource.Cloud_Network.gatewayAddress}, as seen in the deployment topology after a successful request completion:
The documentation is wrong:
Code completion is also wrong: