blob: 132785ab0e92c680ecaf0d5ca0b207fce2f177a7 [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
update_cache: true
cache_valid_time: 3600
- name: Enable sysctl for IPv4 forwarding
sysctl:
name: net.ipv4.ip_forward
value: '1'
sysctl_set: true
reload: true
- name: Create a netplan for non-primary interfaces
template:
src: netplan.yaml.j2
dest: /etc/netplan/02-pronto.yaml
backup: true
owner: root
group: root
mode: 0644
notify:
- netplan-apply
# Docs: http://nftables.org/
- name: Create nftables config file
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