summaryrefslogtreecommitdiffstats
path: root/ansible/roles/infra_create_network
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-03-08 09:54:35 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-03-08 09:54:35 +0000
commit9c50ed0e9bdb4dec5a95af40eb0e89ee962fcd40 (patch)
treebbe6743a7d3ee2db2a2b844e7f7f44b3761e5240 /ansible/roles/infra_create_network
parentd5a2c20d8de2796b2d2e2143ddfb2ba839a0e999 (diff)
parent33189462c6fd60496ae1afec093fb9803d23a18b (diff)
Merge "Allow VMs to access internet"
Diffstat (limited to 'ansible/roles/infra_create_network')
-rw-r--r--ansible/roles/infra_create_network/tasks/create_xml.yml (renamed from ansible/roles/infra_create_network/tasks/create_xml.yaml)20
-rw-r--r--ansible/roles/infra_create_network/tasks/main.yml2
2 files changed, 21 insertions, 1 deletions
diff --git a/ansible/roles/infra_create_network/tasks/create_xml.yaml b/ansible/roles/infra_create_network/tasks/create_xml.yml
index a01c7974a..1632e591c 100644
--- a/ansible/roles/infra_create_network/tasks/create_xml.yaml
+++ b/ansible/roles/infra_create_network/tasks/create_xml.yml
@@ -40,10 +40,30 @@
xpath: /network
add_children:
- name: "{{ item.name }}"
+ - forward:
+ mode: nat
- bridge
- ip
pretty_print: yes
+- name: Add new children nodes to "forward" node
+ xml:
+ path: "{{ xml_file }}"
+ xpath: /network/forward
+ add_children:
+ - nat
+ pretty_print: yes
+
+- name: Add new children nodes to "nat" node
+ xml:
+ path: "{{ xml_file }}"
+ xpath: /network/forward/nat
+ add_children:
+ - port:
+ start: "1024"
+ end: "65535"
+ pretty_print: yes
+
- name: Add "name" attribute to "bridge" node
xml:
path: "{{ xml_file }}"
diff --git a/ansible/roles/infra_create_network/tasks/main.yml b/ansible/roles/infra_create_network/tasks/main.yml
index eba4a3a49..025a775a1 100644
--- a/ansible/roles/infra_create_network/tasks/main.yml
+++ b/ansible/roles/infra_create_network/tasks/main.yml
@@ -18,5 +18,5 @@
name: infra_deploy_vars
- name: Create XML file
- include_tasks: create_xml.yaml
+ include_tasks: create_xml.yml
with_items: "{{ infra_deploy_vars.networks }}"