From 0e80afac47743fbce49f42e1af83d98dbfd06182 Mon Sep 17 00:00:00 2001 From: phogan-nvidia Date: Fri, 4 Oct 2019 10:52:32 -0400 Subject: [PATCH] Added proxy variables --- tasks/install-redhat.yml | 4 ++++ tasks/install-ubuntu.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tasks/install-redhat.yml b/tasks/install-redhat.yml index f1829f2..cac1531 100644 --- a/tasks/install-redhat.yml +++ b/tasks/install-redhat.yml @@ -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 @@ -15,6 +16,7 @@ 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: @@ -22,6 +24,7 @@ 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. @@ -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 {}}}" diff --git a/tasks/install-ubuntu.yml b/tasks/install-ubuntu.yml index 66dec37..17b65f6 100644 --- a/tasks/install-ubuntu.yml +++ b/tasks/install-ubuntu.yml @@ -8,11 +8,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: @@ -21,3 +24,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 {}}}"