noheat: Upgrades, refactor, deploy Devstack
[integration.git] / deployment / noheat / infra-openstack / ansible / roles / create_network / tasks / create_network.yml
index 5d86858..3e22ee6 100644 (file)
@@ -4,11 +4,19 @@
     name: "{{ net.name }}"
     state: present
 
+- name: Set nameservers list fact
+  set_fact:
+    dns_ips: "{{ network.dns_servers | list }}"
+  when: network.dns_servers[0] is defined
+
 - name: "Create {{ net.name }} subnet"
   os_subnet:
     name: "{{ net.name }}_subnet"
     network_name: "{{ net.name }}"
     cidr: "{{ net.cidr }}"
+    dns_nameservers: "{{ dns_ips if dns_ips is defined else omit }}"
+    allocation_pool_start: '{{ net.allocation_pool_start | default("") }}'
+    allocation_pool_end: '{{ net.allocation_pool_end | default ("") }}'
     state: present
 
 - name: "Create {{ net.name }} router"