summaryrefslogtreecommitdiffstats
path: root/ansible/roles/infra_create_network
diff options
context:
space:
mode:
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 }}"