mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
Replace the slurp/set_fact Jinja-heavy approach (which was clobbering pre-existing GRUB_CMDLINE_LINUX content) with a straightforward sequence: grep to detect whether the line exists, lineinfile to initialize an empty one when missing, then two replace tasks using a tempered-greedy-token regex that appends each NVIDIA parameter only when not already present. Idempotent and preserves any existing content in GRUB_CMDLINE_LINUX. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>