# Stack not working with Ansible

## post by whillas on Apr 18, 2021

Hi,

I’m trying to convert the follow script into Ansible

```bash

LAMBDA_REPO=$(mktemp) && 
wget -O${LAMBDA_REPO} https://lambdalabs.com/static/misc/lambda-stack-repo.deb && 
sudo dpkg -i ${LAMBDA_REPO} && rm -f ${LAMBDA_REPO} && 
sudo apt-get update && 
sudo apt-get --yes upgrade && 
echo "cudnn cudnn/license_preseed select ACCEPT" | sudo debconf-set-selections && 
sudo apt-get install --yes --no-install-recommends lambda-server && 
sudo apt-get install --yes --no-install-recommends nvidia-450 libcuda1-450 nvidia-opencl-icd-450 && 
sudo apt-get install --yes --no-install-recommends lambda-stack-cuda
```

and here is my lastest attempt which is breaking with the error `No package matching 'libcuda1-450' is available`?

```yaml

---
- name: Install lambda stack repo
  apt:
    deb: https://lambdalabs.com/static/misc/lambda-stack-repo.deb

- name: Update and upgrade apt packages
  apt:
    upgrade: "yes"
    update_cache: "yes"

- name: apt-get dist-upgrade
  apt:
    upgrade: dist

- name: Pre-agree to the CUDA license stuff
  shell: echo "cudnn cudnn/license_preseed select ACCEPT" | debconf-set-selections

- name: Install the Lambda Labs CUDA drivers
  apt:
    install_recommends: no
    pkg:
      # - lambda-server
      - lambda-stack-cuda
      - nvidia-driver-450
      - libcuda1-450
      - nvidia-opencl-icd-450
  notify:
    - Reboot the machine
```

I’ve checked that the package repo is installed

```ruby

grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*
```

which gives me

```swift
/etc/apt/sources.list.d/lambda-repository.list:deb http://archive.lambdalabs.com/ubuntu focal main
/etc/apt/sources.list.d/lambda-repository.list:# deb-src http://archive.lambdalabs.com/ubuntu focal main
```

and somehow `lambda-stack-cuda` gets installed (or at least doesn’t err). What am i doing wrong here? Has anyone else got this going with Ansible?

This is a clean install of Ubuntu 20.04 on a quad lambda server

alex

## post by whillas on Apr 22, 2021

Ahhh! I’ve stopped using this stack and i’m using the Nvidia Ansible role `nvidia.nvidia_driver`.
