blob: 52d7e9fbbcfef31059167a5a3a60b7190ab4d6b1 [file] [log] [blame]
Zack Williamse695dea2020-11-19 17:17:40 -07001---
2# netprep tasks/Debian.yml
3#
4# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7- name: Install network prep packages
8 apt:
9 name:
10 - bridge-utils
11 - vlan
12 - nftables
13 update_cache: true
14 cache_valid_time: 3600
15
Zack Williamse695dea2020-11-19 17:17:40 -070016- name: Enable sysctl for IPv4 forwarding
17 sysctl:
18 name: net.ipv4.ip_forward
19 value: '1'
20 sysctl_set: true
21 reload: true
22
23- name: Create a netplan for non-primary interfaces
24 template:
25 src: netplan.yaml.j2
26 dest: /etc/netplan/02-pronto.yaml
27 backup: true
28 owner: root
29 group: root
30 mode: 0644
31 notify:
32 - netplan-apply
33
34# Docs: http://nftables.org/
35- name: Create nftables config file
36 template:
37 src: nftables.conf.j2
38 dest: /etc/nftables.conf
39 backup: true
40 owner: root
41 group: root
42 mode: 0755
43 validate: nft -c -f %s
44 notify:
45 - nftables-reload