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 | 9b377bbc1fc75f34a8cca9df667684256e1b6fc2 (patch) | |
| tree | d4d44a8ef199273b5f3bd16be57355333320f8ec | |
| parent | 45c2dbc9c9a9e3e8822187e23e7f787ef602663e (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" |
