summaryrefslogtreecommitdiff
path: root/roles/vm-network/tasks/public.yaml
blob: 85a057d8a0d32abbc177280359af7ad4e6bbe52b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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