Use node[ipaddress] if the cloud IP isn't valid

Workaround for problems caused by OHAI-387
Syntax error in conditional

Use a ternary operator instead.