blob: 8f6650109049e0c7bd6e7aeafec4464a9a541e54 [file] [log] [blame]
---
# netprep tasks/Debian.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Install network prep packages
apt:
name:
- bridge-utils
- vlan
- nftables
- lldpd
update_cache: true
cache_valid_time: 3600
- name: Enable sysctl for IPv4 forwarding
when: netprep_router
sysctl:
name: net.ipv4.ip_forward
value: '1'
sysctl_set: true
reload: true
- name: Create a netplan for interfaces
template:
src: netplan.yaml.j2
dest: "/etc/netplan/{{ netprep_netplan_file }}.yaml"
backup: true
owner: root
group: root
mode: 0644
notify:
- netplan-apply
# Docs: http://nftables.org/
- name: Create nftables config file
when: netprep_router
template:
src: nftables.conf.j2
dest: /etc/nftables.conf
backup: true
owner: root
group: root
mode: 0755
validate: nft -c -f %s
notify:
- nftables-reload