Expand to cover compute nodes
Change-Id: Ia662f9f047d6d5bef19586f1094a3f08c170d98f
diff --git a/defaults/main.yml b/defaults/main.yml
index 6bbef29..536853d 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -4,11 +4,16 @@
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
+# set to true if a router (enables IP forwarding, firewall, etc.)
+netprep_router: false
+
+# file to use for netplan
+netprep_netplan_file: "02-pronto"
+
# Default netplan, which is empty
# docs: https://netplan.io/reference/
netprep_netplan: {}
-
# Default nftables
# docs: https://wiki.nftables.org/
netprep_nftables: {}
diff --git a/tasks/Debian.yml b/tasks/Debian.yml
index 52d7e9f..8f66501 100644
--- a/tasks/Debian.yml
+++ b/tasks/Debian.yml
@@ -10,20 +10,22 @@
- 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 non-primary interfaces
+- name: Create a netplan for interfaces
template:
src: netplan.yaml.j2
- dest: /etc/netplan/02-pronto.yaml
+ dest: "/etc/netplan/{{ netprep_netplan_file }}.yaml"
backup: true
owner: root
group: root
@@ -33,6 +35,7 @@
# Docs: http://nftables.org/
- name: Create nftables config file
+ when: netprep_router
template:
src: nftables.conf.j2
dest: /etc/nftables.conf