Skip to content

Commit

Permalink
Merge pull request #1 from dholt/cfg-mod-params
Browse files Browse the repository at this point in the history
Add method for setting driver module parameters
  • Loading branch information
dholt authored Jul 23, 2019
2 parents 38e4df7 + b0c2f6f commit 7f66955
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ nvidia_driver_package_state: present
nvidia_driver_package_version: ''
nvidia_driver_persistence_mode_on: yes
nvidia_driver_skip_reboot: no
nvidia_driver_module_file: /etc/modprobe.d/nvidia.conf
nvidia_driver_module_params: ''

# RedHat family
nvidia_driver_rhel_epel_repo_baseurl: "https://download.fedoraproject.org/pub/epel/$releasever/$basearch/"
Expand Down
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
enabled: yes
when: nvidia_driver_package_state != 'absent'

- name: set module parameters
template:
src: nvidia.conf.j2
dest: "{{ nvidia_driver_module_file }}"
mode: '0644'

- name: reboot after driver install
reboot:
when: install_driver.changed and not nvidia_driver_skip_reboot
1 change: 1 addition & 0 deletions templates/nvidia.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ nvidia_driver_module_params }}

0 comments on commit 7f66955

Please sign in to comment.