diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-07-05 17:45:37 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-07-05 17:45:37 +0200 |
commit | 2262fee263d21214db911c8ee7c6b218ba18f3bd (patch) | |
tree | 68a9be3230a8302d16979baf488ac59bcf5716e0 /roles/cuda/tasks | |
parent | 0b3d99f96dabb1aa2fbf7f99559852916a97d610 (diff) | |
download | itm-2262fee263d21214db911c8ee7c6b218ba18f3bd.tar.gz itm-2262fee263d21214db911c8ee7c6b218ba18f3bd.tar.bz2 itm-2262fee263d21214db911c8ee7c6b218ba18f3bd.tar.xz itm-2262fee263d21214db911c8ee7c6b218ba18f3bd.zip |
Re-configure CUDA role
Diffstat (limited to 'roles/cuda/tasks')
-rw-r--r-- | roles/cuda/tasks/cuda_init.yml | 5 | ||||
-rw-r--r-- | roles/cuda/tasks/main.yml | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/roles/cuda/tasks/cuda_init.yml b/roles/cuda/tasks/cuda_init.yml index 9a10284..ff54994 100644 --- a/roles/cuda/tasks/cuda_init.yml +++ b/roles/cuda/tasks/cuda_init.yml @@ -36,10 +36,7 @@ path: "{{ cuda_gpu_name0 }}" register: reg_cuda_gpu_name0 check_mode: no - -- debug: - var: reg_cuda_gpu_name0 - verbosity: 1 + failed_when: false - name: Initialize the GPUs - run cuda_init.sh if there is no /dev/nvidia0 command: /bin/bash /usr/local/bin/cuda_init.sh diff --git a/roles/cuda/tasks/main.yml b/roles/cuda/tasks/main.yml index 6d846f8..f292f67 100644 --- a/roles/cuda/tasks/main.yml +++ b/roles/cuda/tasks/main.yml @@ -10,11 +10,19 @@ - block: - include_tasks: configure_yum.yml - when: ansible_pkg_mgr == 'yum' + when: ansible_pkg_mgr == 'yum' or ansible_pkg_mgr == 'dnf' - include_tasks: configure_apt.yml when: ansible_pkg_mgr == 'apt' + - name: Install kernel development files + package: name=kernel-devel state=present + register: result + + - name: Synchronize kernel and kernel-devel packages + package: name=kernel state=latest + when: (result | changed) + - name: Install CUDA and related packages (1.5-2GB download, also restarts if cuda_restart_node_on_install is set to True) package: name: "{{ item }}" |