Page MenuHomeDevCentral

No OneTemporary

diff --git a/roles/core/sysctl/files/sysctl.conf b/roles/core/sysctl/files/sysctl.conf
index 86819ff..9d87dd4 100644
--- a/roles/core/sysctl/files/sysctl.conf
+++ b/roles/core/sysctl/files/sysctl.conf
@@ -1,35 +1,41 @@
# -------------------------------------------------------------
# Kernel state configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-11-06
# License: Trivial work, not eligible to copyright
# Source file: roles/core/sysctl/files/sysctl.conf
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
+{% if is_router %}
+# -------------------------------------------------------------
+# Network
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+net.inet.ip.forwarding=1
+{% endif %}
# -------------------------------------------------------------
# VFS — kernel interface to file systems
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Allow user to mount disks (required by FUSE or PEFS)
vfs.usermount=1
-{% if use_zfs %}
+{%- if use_zfs %}
{% if mem < 4096 %}
# Maximum size of the Adaptive Replacement Cache (ARC).
vfs.zfs.arc_max = 2147483648
{% endif %}
# Keep prefetch: this works by reading larger blocks than were requested
# into the ARC in hopes that the data will be needed soon.
vfs.zfs.prefetch_disable=0
-{% endif %}
+{% endif -%}
diff --git a/roles/core/sysctl/init.sls b/roles/core/sysctl/init.sls
index 9410121..26f205c 100644
--- a/roles/core/sysctl/init.sls
+++ b/roles/core/sysctl/init.sls
@@ -1,22 +1,23 @@
# -------------------------------------------------------------
# Salt — Kernel state
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-11-06
# License: Trivial work, not eligible to copyright
#
# -------------------------------------------------------------
{% if grains['os'] == 'FreeBSD' %}
{% set use_zfs = salt['node.has']('zfs:pool') %}
/etc/sysctl.conf:
file.managed:
- source: salt://roles/core/sysctl/files/sysctl.conf
- template: jinja
- context:
use_zfs: {{ use_zfs }}
mem: {{ grains['mem_total'] }}
+ is_router: {{ "router" in grains['roles'] }}
{% endif %}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jun 16, 00:06 (20 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2733638
Default Alt Text
(2 KB)

Event Timeline