My host inventory carries a bunch of variables for each host. The one I’m interested in is “serverType”. I’d expected to be able to access that variable on the action line. When I use $serverType or ${serverType}, I do not get any variable expansion. I tested this with:
action: command logger ${serverType}
My syslog on the managed system duritully contains:
Jun 29 07:17:16 xxxxxx root: $serverType
On the other hand, when I replace $serverType with ${ansible_eth0.ipv4.address}, the logger logs the IP address into the syslog.
What might the syntax be to access a server variable?
Thanks,
Ed Greenberg