Skip to content

Commit

Permalink
Merge pull request #5 from phogan-nvidia/proxy
Browse files Browse the repository at this point in the history
NVIDIA Driver - Added proxy variables
  • Loading branch information
ajdecon authored Jan 29, 2020
2 parents 40acb14 + 0e80afa commit 861f4af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/install-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
description: EPEL YUM repo
baseurl: "{{ nvidia_driver_rhel_epel_repo_baseurl }}"
gpgkey: "{{ nvidia_driver_rhel_epel_repo_gpgkey }}"
environment: "{{proxy_env if proxy_env is defined else {}}}"

- name: install dependencies
yum: name=dkms
Expand All @@ -15,13 +16,15 @@
description: NVIDIA CUDA YUM Repo
baseurl: "{{ nvidia_driver_rhel_cuda_repo_baseurl }}"
gpgkey: "{{ nvidia_driver_rhel_cuda_repo_gpgkey }}"
environment: "{{proxy_env if proxy_env is defined else {}}}"

- name: install driver packages
yum:
name: "{{ nvidia_driver_package_version | ternary('nvidia-driver-latest-dkms='+nvidia_driver_package_version, 'nvidia-driver-latest-dkms') }}"
state: "{{ nvidia_driver_package_state }}"
autoremove: "{{ nvidia_driver_package_state == 'absent' }}"
register: install_driver
environment: "{{proxy_env if proxy_env is defined else {}}}"

# The driver package pulls in the latest kernel-headers package, but not the
# latest kernel. Check to see if there is a mismatch.
Expand Down Expand Up @@ -58,3 +61,4 @@
state: latest
register: kernel_update
when: kernel_version.msg[0].release != kernel_headers_version.msg[0].release
environment: "{{proxy_env if proxy_env is defined else {}}}"
4 changes: 4 additions & 0 deletions tasks/install-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
apt_key:
url: "{{ nvidia_driver_ubuntu_cuda_repo_gpgkey_url }}"
id: "{{ nvidia_driver_ubuntu_cuda_repo_gpgkey_id }}"
environment: "{{proxy_env if proxy_env is defined else {}}}"


- name: add repo
apt_repository:
repo: "deb {{ nvidia_driver_ubuntu_cuda_repo_baseurl }} /"
update_cache: yes
environment: "{{proxy_env if proxy_env is defined else {}}}"

- name: install driver packages
apt:
Expand All @@ -29,3 +32,4 @@
autoremove: "{{ nvidia_driver_package_state == 'absent' }}"
purge: "{{ nvidia_driver_package_state == 'absent' }}"
register: install_driver
environment: "{{proxy_env if proxy_env is defined else {}}}"

0 comments on commit 861f4af

Please sign in to comment.