summaryrefslogtreecommitdiff
path: root/roles/vm-network/tasks/public.yaml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-11-21 22:28:39 +0100
committerChristian Pointner <equinox@spreadspace.org>2017-11-21 22:28:39 +0100
commit91cd5480b5a1ca1103d5e239af3d331477c41c2c (patch)
treeb495bf31e2d5da50b045838a1e8d0455db09ee65 /roles/vm-network/tasks/public.yaml
initial commit as copy from helsinki ansible repo
Diffstat (limited to 'roles/vm-network/tasks/public.yaml')
-rw-r--r--roles/vm-network/tasks/public.yaml33
1 files changed, 33 insertions, 0 deletions
diff --git a/roles/vm-network/tasks/public.yaml b/roles/vm-network/tasks/public.yaml
new file mode 100644
index 00000000..85a057d8
--- /dev/null
+++ b/roles/vm-network/tasks/public.yaml
@@ -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