Improve check for nvidia driver
so it works also on remote machines
This commit is contained in:
parent
c96c146ff2
commit
6cf02c5304
12
Manual.org
12
Manual.org
@ -2692,9 +2692,17 @@ preferred_refreshrates:
|
||||
name: x@vt7.service
|
||||
state: stopped
|
||||
|
||||
- name: check if a nvidia driver has been installed
|
||||
- name: check /etc/yavdr/autoinstalled if a nvidia driver has been installed
|
||||
lineinfile:
|
||||
name: /etc/yavdr/autoinstalled
|
||||
regexp: '.*nvidia.*'
|
||||
state: absent
|
||||
check_mode: yes
|
||||
register: nvidia_detected
|
||||
|
||||
- name: set_fact | nvidia_driver_installed
|
||||
set_fact:
|
||||
nvidia_driver_installed: '{{ "nvidia" in lookup("file", "/etc/yavdr/autoinstalled") }}'
|
||||
nvidia_driver_installed: '{{ nvidia_detected.changed }}'
|
||||
|
||||
- name: unload nouveau driver, replace with nvidia
|
||||
block:
|
||||
|
@ -41,9 +41,17 @@
|
||||
name: x@vt7.service
|
||||
state: stopped
|
||||
|
||||
- name: check if a nvidia driver has been installed
|
||||
- name: check /etc/yavdr/autoinstalled if a nvidia driver has been installed
|
||||
lineinfile:
|
||||
name: /etc/yavdr/autoinstalled
|
||||
regexp: '.*nvidia.*'
|
||||
state: absent
|
||||
check_mode: yes
|
||||
register: nvidia_detected
|
||||
|
||||
- name: set_fact | nvidia_driver_installed
|
||||
set_fact:
|
||||
nvidia_driver_installed: '{{ "nvidia" in lookup("file", "/etc/yavdr/autoinstalled") }}'
|
||||
nvidia_driver_installed: '{{ nvidia_detected.changed }}'
|
||||
|
||||
- name: unload nouveau driver, replace with nvidia
|
||||
block:
|
||||
|
Loading…
Reference in New Issue
Block a user