Move ns_ipaddress definition into the template resource.