Page MenuHomeDevCentral

D4101.diff
No OneTemporary

D4101.diff

diff --git a/roles/core/network/files/newsyslog_gre.conf b/roles/core/network/files/newsyslog_gre.conf
--- a/roles/core/network/files/newsyslog_gre.conf
+++ b/roles/core/network/files/newsyslog_gre.conf
@@ -3,7 +3,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/router/carp/files/newsyslog.conf
+# Source file: roles/core/network/files/newsyslog_gre.conf
# -------------------------------------------------------------
#
# <auto-generated>
diff --git a/roles/core/network/files/syslog_gre.conf b/roles/core/network/files/syslog_gre.conf
--- a/roles/core/network/files/syslog_gre.conf
+++ b/roles/core/network/files/syslog_gre.conf
@@ -3,7 +3,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/router/carp/files/syslog.conf
+# Source file: roles/core/network/files/syslog_gre.conf
# -------------------------------------------------------------
#
# <auto-generated>
@@ -14,4 +14,5 @@
# </auto-generated>
!gre-tunnels
-*.* /var/log/gre-tunnels.log
+*.* /var/log/gre-tunnels.log
+!*
diff --git a/roles/core/network/gre_logging.sls b/roles/core/network/gre_logging.sls
--- a/roles/core/network/gre_logging.sls
+++ b/roles/core/network/gre_logging.sls
@@ -1,19 +1,30 @@
+# -------------------------------------------------------------
+# Salt — Network — GRE tunnels log
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
/usr/local/etc/syslog.d/gre-tunnels.conf:
file.managed:
- - source: salt://roles/core/network/files/FreeBSD/syslog_gre.conf
+ - source: salt://roles/core/network/files/syslog_gre.conf
- user: root
- group: wheel
- mode: 644
/etc/newsyslog.conf.d/gre-tunnels.conf:
file.managed:
- - source: salt://roles/core/network/files/FreeBSD/newsyslog_gre.conf
+ - source: salt://roles/core/network/files/newsyslog_gre.conf
- user: root
- group: wheel
- mode: 644
-reload_syslogd_for_gre_logs:
- cmd.run:
- - name: service syslogd reload
- - onchanges:
- - file: /usr/local/etc/syslog.d/gre-tunnels.conf
+/etc/syslog.conf:
+ file.replace:
+ - pattern: '^!-carp-ovh\n\*\.notice;authpriv\.none;kern\.debug;lpr\.info;mail\.crit;news\.err\s+/var/log/messages\n!\*$'
+ - repl: '!-carp-ovh,gre-tunnels\n*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages\n!*'
+ - flags:
+ - MULTILINE
+ - count: 1
+ - backup: False
+ - unless: grep -Fqx '!-carp-ovh,gre-tunnels' /etc/syslog.conf
diff --git a/roles/core/network/init.sls b/roles/core/network/init.sls
--- a/roles/core/network/init.sls
+++ b/roles/core/network/init.sls
@@ -12,6 +12,7 @@
- .ipv6_fixes
- .dhclient6
- .gre
+ - .gre_logging
- .routes
# Drake can be configured as:

File Metadata

Mime Type
text/plain
Expires
Wed, May 6, 16:17 (22 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3691234
Default Alt Text
D4101.diff (3 KB)

Event Timeline