Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56967346
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/router/carp/files/newsyslog.conf b/roles/router/carp/files/newsyslog.conf
new file mode 100644
index 0000000..e9f1a6c
--- /dev/null
+++ b/roles/router/carp/files/newsyslog.conf
@@ -0,0 +1,16 @@
+# -------------------------------------------------------------
+# Salt — CARP newsyslog
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/router/carp/files/newsyslog.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>
+
+/var/log/carp.log root:wheel 644 7 1000 * JC
diff --git a/roles/router/carp/files/syslog.conf b/roles/router/carp/files/syslog.conf
new file mode 100644
index 0000000..fb3fc34
--- /dev/null
+++ b/roles/router/carp/files/syslog.conf
@@ -0,0 +1,18 @@
+# -------------------------------------------------------------
+# Salt — CARP syslog
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/router/carp/files/syslog.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>
+
+!carp-ovh
+*.* /var/log/carp.log
+!*
diff --git a/roles/router/carp/init.sls b/roles/router/carp/init.sls
index fbf118c..3602cce 100644
--- a/roles/router/carp/init.sls
+++ b/roles/router/carp/init.sls
@@ -1,48 +1,69 @@
# -------------------------------------------------------------
# Salt — Router — CARP
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import packages_prefixes with context %}
/etc/rc.conf.d/netif/carp:
file.managed:
- source: salt://roles/router/carp/files/carp.rc
- template: jinja
- context:
carp_entries: {{ salt['node.get_carp_entries']() }}
- mode: '0644'
/boot/loader.conf.d/carp.conf:
file.managed:
- source: salt://roles/router/carp/files/carp.conf
- mode: '0644'
carp_switch_pip:
pkg.installed:
- name: {{ packages_prefixes.python3 }}pip
carp_switch_dependencies:
cmd.run:
- name: python3 -m pip install ovh secretsmith
- creates: {{ salt['python.get_site_packages_directory']() }}/secretsmith
/usr/local/etc/secrets/carp-secretsmith.yaml:
file.managed:
- source: salt://roles/router/carp/files/secrets.conf
- mode: 400
- makedirs: True
- show_changes: False
- template: jinja
- context:
vault:
approle: {{ salt["credentials.read_secret"]("network/router/vault") }}
addr: {{ pillar["nasqueron_services"]["vault_url"] }}
/usr/local/etc/devd/carp.conf:
file.managed:
- source: salt://roles/router/carp/files/carp-devd.conf
- makedirs: True
- mode: 644
+
+/usr/local/etc/syslog.d/carp.conf:
+ file.managed:
+ - source: salt://roles/router/carp/files/syslog.conf
+ - makedirs: True
+ - mode: 644
+
+/etc/newsyslog.conf.d/carp.conf:
+ file.managed:
+ - source: salt://roles/router/carp/files/newsyslog.conf
+ - mode: 644
+
+/etc/syslog.conf:
+ file.replace:
+ - pattern: '^\*\.notice;authpriv\.none;kern\.debug;lpr\.info;mail\.crit;news\.err\s+/var/log/messages$'
+ - repl: '!-carp-ovh\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' /etc/syslog.conf
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Nov 14, 00:23 (3 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4247269
Default Alt Text
(4 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment