Can we get this stored for later use in the same way as the ip is configured?  I'm not sure when else we may want to access the netmask, but it seems like the right thing to do.

See a few lines up:
host['ip'] ||= randip

So just a host['netmask'] ||= "255.255.0.0" would be great.