]> Andreas Glashauser | Gitweb - salt-qubes.git/commitdiff
CHANGED: Mitigate Fedora issue by replacing file.managed source: in common.kernel
authorAndreas Glashauser <ag@andreasglashauser.com>
Tue, 1 Apr 2025 07:54:10 +0000 (09:54 +0200)
committerAndreas Glashauser <ag@andreasglashauser.com>
Tue, 1 Apr 2025 08:16:48 +0000 (10:16 +0200)
user_salt/common/kernel/files/sound-modules [deleted file]
user_salt/common/kernel/kernel--disable-sound.sls

diff --git a/user_salt/common/kernel/files/sound-modules b/user_salt/common/kernel/files/sound-modules
deleted file mode 100644 (file)
index 664dd91..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-blacklist snd
-blacklist snd_timer
-blacklist snd_seq_device
-blacklist snd_seq
-blacklist snd_hrtimer
-blacklist snd_seq_dummy
-blacklist snd_pcm
-blacklist soundcore
-blacklist pcspkr
-blacklist snd_pcsp
index 85d2b19dcf7146ee743b1972cb8d703d2e038579..74dde9ac7eb462e9ca11ce31eb630962621c4059 100644 (file)
@@ -1,7 +1,34 @@
 {% if grains['id'] != 'dom0' %}
 
-/etc/modprobe.d/blacklist.conf:
-  file.append:
-    - source: salt://common/kernel/files/sound-modules
+kernel--modprobe-blacklistconf-exists:
+  file.managed:
+    - name: /etc/modprobe.d/blacklist.conf
+    - user: root
+    - group: root
+    - mode: 644
+    - create: True
+    - makedirs: True
+    - replace: False
+
+kernel--blacklist-sound-modules:
+  file.blockreplace:
+    - name: /etc/modprobe.d/blacklist.conf
+    - marker_start: "# {mark} MANAGED BY SALT - START"
+    - marker_end: "# {mark} MANAGED BY SALT - END"
+    - content: |
+        blacklist snd
+        blacklist snd_timer
+        blacklist snd_seq_device
+        blacklist snd_seq
+        blacklist snd_hrtimer
+        blacklist snd_seq_dummy
+        blacklist snd_pcm
+        blacklist soundcore
+        blacklist pcspkr
+        blacklist snd_pcsp
+    - append_if_not_found: True
+    - show_changes: True
+    - require:
+      - kernel--modprobe-blacklistconf-exists
 
 {% endif %}