From e80bcdb2ce2dab5ba0bf08dfd80c92eaeeeb5d31 Mon Sep 17 00:00:00 2001 From: Adam DeConinck Date: Fri, 11 Sep 2020 19:50:38 +0000 Subject: [PATCH 1/2] Expand documentation in README - Add a note that the role should be run from a separate ansible control node - Document the role variables available to change --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 6dc977a..a2c85c7 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,15 @@ An Ansible role to install the NVIDIA driver from the NVIDIA CUDA repositories. +## Requirements + +In the process of installing the NVIDIA driver, this role will reboot the nodes where it runs. +Because of this, we strongly recommend that you run `ansible-playbook` from a separate node than the GPU nodes where you are installing the driver. + +If you attempt to run Ansible on the same node where you are installing the driver, this role will either: + +* Refuse to proceed with an error like `Running reboot with local connection would reboot the control node` (if running with the `local` connection) +* Reboot the node you're running on, interrupting the playbook execution! (if running the an `ssh` connection against localhost) ## Installing @@ -11,6 +20,37 @@ This role can be installed using [Ansible Galaxy](https://galaxy.ansible.com/nvi $ ansible-galaxy install nvidia.nvidia_driver ``` +## Role variables + +| Variable | Default value | Description | +| -------- | ------------- | ----------- | +| `nvidia_driver_package_state` | `"present"` | Package state for NVIDIA driver packages | +| `nvidia_driver_package_version` | `""` | Package version to install. Note that this should match the actual version of the deb or RPM package to be installed. | +| `nvidia_driver_persistence_mode_on` | `yes` | Whether to enable persistence mode (boolean) | +| `nvidia_driver_skip_reboot` | `no` | Whether to skip rebooting the node during the install | +| `nvidia_driver_module_file` | `"/etc/modprobe.d/nvidia.conf"` | Filename to use for NVIDIA driver parameters | +| `nvidia_driver_module_params` | `""` | Parameters to pass to the NVIDIA driver | + +### Red Hat specific variables + +| `nvidia_driver_rhel_epel_repo_baseurl` | `"https://download.fedoraproject.org/pub/epel/$releasever/$basearch/"` | Base URL to use for EPEL repo | +| `nvidia_driver_rhel_epel_repo_gpgkey` | `"https://epel.mirror.constant.com//RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"` | GPG key for the EPEL repo | +| `nvidia_driver_rhel_cuda_repo_baseurl` | `"https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/"` | Base URL to use for CUDA repo | +| `nvidia_driver_rhel_cuda_repo_gpgkey` | `"https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/7fa2af80.pub"` | GPG key for the CUDA repo | + +### Ubuntu specific variables + +| `nvidia_driver_ubuntu_cuda_repo_baseurl` | `"http://developer.download.nvidia.com/compute/cuda/repos/{{ _ubuntu_repo_dir }}"` | Base URL to use for CUDA repo | +| `nvidia_driver_ubuntu_cuda_repo_gpgkey_url` | `"https://developer.download.nvidia.com/compute/cuda/repos/{{ _ubuntu_repo_dir }}/7fa2af80.pub"` | GPG key for the CUDA repo | +| `nvidia_driver_ubuntu_cuda_repo_gpgkey_id` | `"7fa2af80"` | GPG key ID for the CUDA repo | + +## Example playbook + +``` +- hosts: gpu_nodes + roles: + - nvidia.nvidia_driver +``` ## Supported distributions From 6609d287a97959ed8e3f81f26fd246cfabbcc296 Mon Sep 17 00:00:00 2001 From: Adam DeConinck Date: Fri, 11 Sep 2020 19:55:08 +0000 Subject: [PATCH 2/2] fix table formatting --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index a2c85c7..adf52b1 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ $ ansible-galaxy install nvidia.nvidia_driver ## Role variables + | Variable | Default value | Description | | -------- | ------------- | ----------- | | `nvidia_driver_package_state` | `"present"` | Package state for NVIDIA driver packages | @@ -33,6 +34,9 @@ $ ansible-galaxy install nvidia.nvidia_driver ### Red Hat specific variables + +| Variable | Default value | Description | +| -------- | ------------- | ----------- | | `nvidia_driver_rhel_epel_repo_baseurl` | `"https://download.fedoraproject.org/pub/epel/$releasever/$basearch/"` | Base URL to use for EPEL repo | | `nvidia_driver_rhel_epel_repo_gpgkey` | `"https://epel.mirror.constant.com//RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"` | GPG key for the EPEL repo | | `nvidia_driver_rhel_cuda_repo_baseurl` | `"https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/"` | Base URL to use for CUDA repo | @@ -40,6 +44,9 @@ $ ansible-galaxy install nvidia.nvidia_driver ### Ubuntu specific variables + +| Variable | Default value | Description | +| -------- | ------------- | ----------- | | `nvidia_driver_ubuntu_cuda_repo_baseurl` | `"http://developer.download.nvidia.com/compute/cuda/repos/{{ _ubuntu_repo_dir }}"` | Base URL to use for CUDA repo | | `nvidia_driver_ubuntu_cuda_repo_gpgkey_url` | `"https://developer.download.nvidia.com/compute/cuda/repos/{{ _ubuntu_repo_dir }}/7fa2af80.pub"` | GPG key for the CUDA repo | | `nvidia_driver_ubuntu_cuda_repo_gpgkey_id` | `"7fa2af80"` | GPG key ID for the CUDA repo |