Page MenuHomeDevCentral

D2203.diff
No OneTemporary

D2203.diff

diff --git a/roles/core/rc/files/periodic.conf b/roles/core/rc/files/periodic.conf
new file mode 100644
--- /dev/null
+++ b/roles/core/rc/files/periodic.conf
@@ -0,0 +1,9 @@
+# 300.calendar
+daily_portsnap_enable="YES"
+
+# 480.status-ntpd
+daily_status_ntpd_enable="YES"
+{% if use_zfs %}
+# 800.scrub-zfs
+daily_scrub_zfs_enable="YES"
+{% endif %}
diff --git a/roles/core/rc/init.sls b/roles/core/rc/init.sls
--- a/roles/core/rc/init.sls
+++ b/roles/core/rc/init.sls
@@ -6,6 +6,8 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
+{% set use_zfs = salt['node.has']('zfs:pool') %}
+
# -------------------------------------------------------------
# IPv6
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -16,3 +18,16 @@
- name : /etc/rc.local
- source: salt://roles/core/rc/files/rc.local.sh
{% endif %}
+
+# -------------------------------------------------------------
+# Periodic tasks configuration
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os'] == 'FreeBSD' %}
+/etc/periodic.conf:
+ file.managed:
+ - source: salt://roles/core/rc/files/periodic.conf
+ - template: jinja
+ - context:
+ use_zfs: {{ use_zfs }}
+{% endif %}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 16:15 (21 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2250812
Default Alt Text
D2203.diff (1 KB)

Event Timeline