summaryrefslogtreecommitdiff
path: root/roles/vm-network/tasks/public.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/vm-network/tasks/public.yml')
-rw-r--r--roles/vm-network/tasks/public.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/roles/vm-network/tasks/public.yml b/roles/vm-network/tasks/public.yml
new file mode 100644
index 00000000..8b0e317a
--- /dev/null
+++ b/roles/vm-network/tasks/public.yml
@@ -0,0 +1,33 @@
+---
+- name: set routing table names
+ with_items:
+ - { regexp: '^89\s', line: '89 mur-default' }
+ - { regexp: '^212\s', line: '212 upc-default' }
+ lineinfile:
+ regexp: "{{ item.regexp }}"
+ line: "{{ item.line }}"
+ dest: /etc/iproute2/rt_tables
+
+- name: calculate address lists
+ set_fact:
+ srv_network_public_firewall_ipv4:
+ - "{{ srv_network.public.ip_mur }}"
+ - "{{ srv_network.public.ip_upc }}"
+ srv_network_public_firewall_ipv6:
+ - "{{ srv_network.public.ip_mur6 }}"
+
+- name: install firewall scripts
+ with_items:
+ - 4
+ - 6
+ template:
+ src: firewall.sh_public.j2
+ dest: "/etc/network/firewall{{ item }}.sh"
+ mode: 0755
+ when: srv_network.public.firewall is defined
+
+- name: install interface config (Public)
+ template:
+ src: interfaces_public.j2
+ dest: /etc/network/interfaces
+ mode: 0644