summaryrefslogtreecommitdiffstats
path: root/roles/cuda/tests
diff options
context:
space:
mode:
Diffstat (limited to 'roles/cuda/tests')
-rw-r--r--roles/cuda/tests/install.yml23
-rw-r--r--roles/cuda/tests/inventory5
-rw-r--r--roles/cuda/tests/test.yml12
3 files changed, 40 insertions, 0 deletions
diff --git a/roles/cuda/tests/install.yml b/roles/cuda/tests/install.yml
new file mode 100644
index 0000000..03b9360
--- /dev/null
+++ b/roles/cuda/tests/install.yml
@@ -0,0 +1,23 @@
+---
+- hosts: localhost
+ connection: local
+ roles:
+ - { name: lae.travis-lxc }
+ vars:
+ host_quantity: 1
+
+# Run the following within the containers in the inventory
+- hosts: all
+ tasks:
+ # Solution for avahi-daemon issue from https://github.com/lxc/lxc/issues/25
+ - block:
+ - name: Install avahi-daemon early on Ubuntu 16 containers
+ package:
+ name: avahi-daemon
+ ignore_errors: True
+ - name: Remove nproc from avahi-daemon.conf
+ lineinfile:
+ dest: /etc/avahi/avahi-daemon.conf
+ regexp: "^rlimit-nproc="
+ state: absent
+ when: "ansible_distribution_release == 'xenial'"
diff --git a/roles/cuda/tests/inventory b/roles/cuda/tests/inventory
new file mode 100644
index 0000000..e45e40f
--- /dev/null
+++ b/roles/cuda/tests/inventory
@@ -0,0 +1,5 @@
+[cuda]
+test01.lxc
+
+[cuda:vars]
+ansible_ssh_user=root
diff --git a/roles/cuda/tests/test.yml b/roles/cuda/tests/test.yml
new file mode 100644
index 0000000..5125bda
--- /dev/null
+++ b/roles/cuda/tests/test.yml
@@ -0,0 +1,12 @@
+---
+- hosts: all
+ become: True
+ roles:
+ - ansible-role-cuda
+ vars:
+ - gpu: True
+ - cuda_restart_node_on_install: False
+ - cuda_init: True
+ - cuda_init_restart_service: False
+
+# vim:ft=ansible: