Improve check for nvidia driver

so it works also on remote machines
This commit is contained in:
Alexander Grothe 2019-05-23 16:27:05 +02:00
parent c96c146ff2
commit 6cf02c5304
2 changed files with 20 additions and 4 deletions

View File

@ -2692,9 +2692,17 @@ preferred_refreshrates:
name: x@vt7.service name: x@vt7.service
state: stopped 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: 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 - name: unload nouveau driver, replace with nvidia
block: block:

View File

@ -41,9 +41,17 @@
name: x@vt7.service name: x@vt7.service
state: stopped 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: 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 - name: unload nouveau driver, replace with nvidia
block: block: