blob: 132785ab0e92c680ecaf0d5ca0b207fce2f177a7 [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
16
17- name: Enable sysctl for IPv4 forwarding
18 sysctl:
19 name: net.ipv4.ip_forward
20 value: '1'
21 sysctl_set: true
22 reload: true
23
24- name: Create a netplan for non-primary interfaces
25 template:
26 src: netplan.yaml.j2
27 dest: /etc/netplan/02-pronto.yaml
28 backup: true
29 owner: root
30 group: root
31 mode: 0644
32 notify:
33 - netplan-apply
34
35# Docs: http://nftables.org/
36- name: Create nftables config file
37 template:
38 src: nftables.conf.j2
39 dest: /etc/nftables.conf
40 backup: true
41 owner: root
42 group: root
43 mode: 0755
44 validate: nft -c -f %s
45 notify:
46 - nftables-reload