blob: 52d7e9fbbcfef31059167a5a3a60b7190ab4d6b1 [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