Running from the master node scripting console, or from the a system groovy script (that also runs on the master), how do I get the ip address(es) of a slave node?
@Dave Bacher's answer will give you all IP's for the given host.
Assuming your slaves are SSH based, this will give you strictly the IP that the agent uses:
def jenkins = jenkins.model.Jenkins.instance
for (node in jenkins.nodes) {
println "${node.nodeName}: node.toComputer().launcher.host"
}