From: Andreas Glashauser Date: Tue, 1 Apr 2025 07:54:10 +0000 (+0200) Subject: CHANGED: Mitigate Fedora issue by replacing file.managed source: in common.kernel X-Git-Url: https://git.andreasglashauser.com/?a=commitdiff_plain;h=c9fccab7253ae22b987e2011b30a3d95d74a5ea9;p=salt-qubes.git CHANGED: Mitigate Fedora issue by replacing file.managed source: in common.kernel --- diff --git a/user_salt/common/kernel/files/sound-modules b/user_salt/common/kernel/files/sound-modules deleted file mode 100644 index 664dd91..0000000 --- a/user_salt/common/kernel/files/sound-modules +++ /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 diff --git a/user_salt/common/kernel/kernel--disable-sound.sls b/user_salt/common/kernel/kernel--disable-sound.sls index 85d2b19..74dde9a 100644 --- a/user_salt/common/kernel/kernel--disable-sound.sls +++ b/user_salt/common/kernel/kernel--disable-sound.sls @@ -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 %}