diff options
| author | Ahmed AbdelHalim <[email protected]> | 2026-01-24 18:14:48 +0100 |
|---|---|---|
| committer | Ahmed AbdelHalim <[email protected]> | 2026-01-24 18:14:48 +0100 |
| commit | 7eac6fe38100e40a1b56e2b99c68b1cdd269736b (patch) | |
| tree | d4d44a8ef199273b5f3bd16be57355333320f8ec | |
| parent | e8013466114b6b9b3ded448084b1dc2bd22c240e (diff) | |
Fix or ignore nvidia role linting issues
| -rw-r--r-- | roles/nvidia/tasks/install-archlinux.yml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/roles/nvidia/tasks/install-archlinux.yml b/roles/nvidia/tasks/install-archlinux.yml index cbcc2221..f11f71ba 100644 --- a/roles/nvidia/tasks/install-archlinux.yml +++ b/roles/nvidia/tasks/install-archlinux.yml @@ -23,15 +23,17 @@ - name: "Get current mkinitcpio MODULES" become: true - ansible.builtin.shell: - cmd: "grep '^MODULES=' /etc/mkinitcpio.conf | sed 's/MODULES=(\\(.*\\))/\\1/'" - register: "current_modules" + ansible.builtin.shell: | + set -euo pipefail + grep '^MODULES=' /etc/mkinitcpio.conf | sed 's/MODULES=(\\(.*\\))/\\1/' + # noqa var-naming[no-role-prefix] as it describes the current kernel modules and not the nvidia modules + register: "current_kernel_modules" changed_when: false - name: "Add NVIDIA modules to mkinitcpio" become: true vars: - existing_modules: "{{ current_modules.stdout.split() | reject('in', nvidia_modules) | list }}" + existing_modules: "{{ current_kernel_modules.stdout.split() | reject('in', nvidia_modules) | list }}" all_modules: "{{ existing_modules + nvidia_modules }}" ansible.builtin.lineinfile: path: "/etc/mkinitcpio.conf" |
