Check for network in role.networks for resolve and qdr
Check for network in role.networks for resolve and qdr

In https://review.opendev.org/722241 the service net map
HostnameResolveNetwor was fixed for roles that don't have
the InternalApi network. This follows up and fixes the
same issue for MetricsQdrNetwork and Ceph roles as well.

Also re-factor the jinja2 to iterate only once over the
roles.

Related-Bug: #1874330
Change-Id: Iff0e30a6c52fea75449dbd228dec45f708036f9f

openstack/tripleo-heat-templates,openstack/tripleo-heat-templates