diff --git a/tasks/install-redhat.yml b/tasks/install-redhat.yml index 379e422..8da4aa4 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 301a906..7bc40b4 100644 --- a/tasks/install-ubuntu.yml +++ b/tasks/install-ubuntu.yml @@ -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: @@ -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 {}}}"