From d19b2c79a8a503236bd64e08dce3e4032421e405 Mon Sep 17 00:00:00 2001
From: Eesaan Atluri <atlurie@uab.edu>
Date: Thu, 17 Nov 2022 09:15:20 -0600
Subject: [PATCH] Redesigned playbooks after refactoring cheaha.node role.

---
 ansible/base.yml    |  4 ++--
 ansible/cheaha.yml  | 10 ++++++++++
 ansible/compute.yml |  2 +-
 ansible/gpu.yml     |  6 ++----
 4 files changed, 15 insertions(+), 7 deletions(-)
 create mode 100644 ansible/cheaha.yml

diff --git a/ansible/base.yml b/ansible/base.yml
index 0ec04f0..93bc7a0 100644
--- a/ansible/base.yml
+++ b/ansible/base.yml
@@ -1,6 +1,6 @@
 ---
-- name: Setup node for use as a cluster host
+- name: Install base packages
   hosts: default
   become: true
   roles:
-    - { name: 'compute_packages', tags: 'compute_packages' }
+    - { name: 'install_packages', tags: 'install_packages' }
diff --git a/ansible/cheaha.yml b/ansible/cheaha.yml
new file mode 100644
index 0000000..1ddc018
--- /dev/null
+++ b/ansible/cheaha.yml
@@ -0,0 +1,10 @@
+---
+- name: Setup node for use as a virtual cheaha node
+  hosts: default
+  become: true
+  roles:
+    - { name: 'cheaha.node', tags: 'cheaha.node' }
+    - { name: 'install_packages', tags: 'install_packages' }
+    - { name: 'nfs_mounts', tags: 'nfs_mounts' }
+    - { name: 'ldap_config', tags: 'ldap_config' }
+    - { name: 'slurm_client', tags: 'slurm_client' }
diff --git a/ansible/compute.yml b/ansible/compute.yml
index 76000fa..f626127 100644
--- a/ansible/compute.yml
+++ b/ansible/compute.yml
@@ -3,6 +3,6 @@
   hosts: default
   become: true
   roles:
-    - { name: 'cheaha.node', tags: 'cheaha.node' }
+    - { name: 'install_packages', tags: 'install_packages' }
     - { name: 'pam_slurm_adopt', tags: 'pam_slurm_adopt' }
     - { name: 'lmod_user', tags: 'lmod_user'}
diff --git a/ansible/gpu.yml b/ansible/gpu.yml
index 1da928e..5d032dc 100644
--- a/ansible/gpu.yml
+++ b/ansible/gpu.yml
@@ -1,9 +1,7 @@
 ---
-- 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:
-    - { name: 'nvidia_driver', tags: 'nvidia_driver' }
+    - { name: 'install_packages', tags: 'install_packages' }
+    - { name: 'cuda_driver', tags: 'cuda_driver' }
-- 
GitLab