From 8465d2af4aae3fea4362fe6458d24080158691b3 Mon Sep 17 00:00:00 2001 From: damon Date: Tue, 2 Apr 2019 23:00:59 +1300 Subject: [PATCH] Cleanup --- manifests/init.pp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 7bf2495..171e98c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,12 +17,15 @@ String $nvidia_docker2_version = latest, ) { - # REVISIT: Want to require docker but causes circular dependencies include apt $distribution = "${$facts['operatingsystem'].downcase}${$facts['operatingsystemmajrelease']}" - $cuda_repo = "https://developer.download.nvidia.com/compute/cuda/repos/${regsubst($distribution, '\.', '', 'G')} - /x86_64" + $distribution_no_dot = regsubst($distribution, '\.', '', 'G') + $cuda_arch = $facts['architecture'] ? { + 'amd64' => 'x86_64', + default => $facts['architecture'], + } + $cuda_repo = "https://developer.download.nvidia.com/compute/cuda/repos/${$distribution_no_dot}/${cuda_arch}" $linux_headers_package = "linux-headers-${$facts['kernelrelease']}" package { ['build-essential', $linux_headers_package]: