Add and use own rmmod module instead of rmmod command.

This is a workaround for the modprobe module which fails to unload
modules using modprobe -r MODULE.

Using a dedicated module instead of a plain (shell) command allows to
fail only on important errors.
This commit is contained in:
Alexander Grothe
2019-05-08 13:26:02 +02:00
parent 9b16bd9971
commit a3331d82e4
3 changed files with 107 additions and 4 deletions

View File

@@ -56,13 +56,22 @@
# unloading the drivers using the modprobe module does not work for some strange reason...
- name: unload kms drivers
command: rmmod '{{ item }}'
rmmod:
name: '{{ item }}'
loop:
- nouveau
- ttm
- drm_kms_helper
- drm
ignore_errors: yes
#- name: unload kms drivers
# command: rmmod '{{ item }}'
# loop:
# - nouveau
# - ttm
# - drm_kms_helper
# - drm
# ignore_errors: yes
- name: load nvidia driver
modprobe: