Install NVIDIA GPU drivers when needed
This commit is contained in:
parent
9bd8f8d54f
commit
f51ff2c29f
1 changed files with 13 additions and 0 deletions
13
deploy.yml
13
deploy.yml
|
@ -45,6 +45,19 @@
|
||||||
- virt-manager # manage virtual machines
|
- virt-manager # manage virtual machines
|
||||||
- yamllint # linter for yaml files
|
- yamllint # linter for yaml files
|
||||||
|
|
||||||
|
- name: check for nvidia gpu
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: lspci -d '0x10de:' -n | grep -E '^[0-9]+:[0-9]+\.[0-9]+ 0300:'
|
||||||
|
register: nvidia_check
|
||||||
|
failed_when: false
|
||||||
|
check_mode: false
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: install nvidia gpu drivers
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: nvidia-driver
|
||||||
|
when: nvidia_check.rc == 0
|
||||||
|
|
||||||
- name: hide grub menu during boot
|
- name: hide grub menu during boot
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/default/grub
|
path: /etc/default/grub
|
||||||
|
|
Loading…
Add table
Reference in a new issue