From 3f074d427a91c362696169412b6d56ab722252b4 Mon Sep 17 00:00:00 2001
From: Eesaan Atluri <atlurie@uab.edu>
Date: Fri, 4 Nov 2022 10:15:31 -0500
Subject: [PATCH] Add playbooks for building compute gpu and base node images.

---
 ansible/node-compute.yml | 10 ++++++++++
 ansible/node-gpu.yml     |  7 +++++--
 ansible/node.yml         |  4 ++--
 3 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 ansible/node-compute.yml

diff --git a/ansible/node-compute.yml b/ansible/node-compute.yml
new file mode 100644
index 0000000..d924731
--- /dev/null
+++ b/ansible/node-compute.yml
@@ -0,0 +1,10 @@
+---
+- name: Run a play
+  ansible.builtin.import_playbook: node.yml
+  
+- name: Setup node for use as a virtual compute node
+  hosts: default
+  become: true
+  roles:
+    - { name: 'compute_packages', tags: 'compute_packages' }
+    - { name: 'pam_slurm_adopt', tags: 'pam_slurm_adopt' }
diff --git a/ansible/node-gpu.yml b/ansible/node-gpu.yml
index 005f0af..1da928e 100644
--- a/ansible/node-gpu.yml
+++ b/ansible/node-gpu.yml
@@ -1,6 +1,9 @@
 ---
-- name: Setup node for use as a cluster host with gpu packages
+- name: Run a play
+  ansible.builtin.import_playbook: node-compute.yml
+
+- name: Setup node for use as a cluster host with gpu drivers/pkgs
   hosts: default
   become: true
   roles:
-    - cheaha.node
+    - { name: 'nvidia_driver', tags: 'nvidia_driver' }
diff --git a/ansible/node.yml b/ansible/node.yml
index d97cf11..32c6206 100644
--- a/ansible/node.yml
+++ b/ansible/node.yml
@@ -3,5 +3,5 @@
   hosts: default
   become: true
   roles:
-    - cheaha.node
-    - lmod_user
+    - { name: 'cheaha.node', tags: 'cheaha.node' }
+    - { name: 'lmod_user', tags: 'lmod_user' }
-- 
GitLab