- file: path=/opt/ec2-api-tools
        state=directory mode=0755 owner=root group=root

- name: install unzip utility
  apt: name=unzip
       state=latest update_cache=yes cache_valid_time=600

- name: unzip and install ec2 api tools
  unarchive:
    src=/tmp/ec2-api-tools.zip
    dest=/opt/ec2-api-tools
    copy=no

- name: install CUDA repository
  apt: deb=/tmp/cuda.deb

# note, make sure update actually happens here (no cache_valid_time),
#  since deb above adds repos
- name: install CUDA
  apt: name=cuda
       state=latest update_cache=yes

- name: install linux kernel headers
  apt: name=linux-image-extra-{{ ansible_kernel }}
       state=latest update_cache=yes cache_valid_time=600
