Skip to content
Snippets Groups Projects
Commit f77e7b81 authored by Juraj Paluba's avatar Juraj Paluba Committed by Juraj Paluba
Browse files

playbook: update routing for MAN

Debian version 10 uses netplan to manage interafaces. That means that
they no longer have `/etc/network/interfaces` directory. This causes
network ansible to fail.

It can be easily fixed by using the `ip route` command line tool.
parent 8721b539
Branches
Tags
No related merge requests found
......@@ -95,9 +95,33 @@
jump: DROP
loop: '{{ private_ip_address_range }}'
- name: Set IPV4 forwarding for MAN
hosts: man
strategy: free
gather_facts: yes
become: yes
become_user: root
tasks:
- name: set ip forward
sysctl:
name: net.ipv4.ip_forward
value: '1'
- name: Set routes to host networks for MAN
hosts: man
strategy: free
gather_facts: yes
become: yes
become_user: root
tasks:
- name: Create route for host networks
shell: "ip route add {{ item.net }}/{{ item.mask }} via {{ item.gw }}"
loop: "{{ interfaces[0].routes }}"
- name: Sandbox networking
hosts:
- management
- routers
strategy: free
gather_facts: yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment