From b856b742b44dea3ea6ce4d011d98cc499a1f1dc1 Mon Sep 17 00:00:00 2001
From: Ravi Tripathi <ravi89@uab.edu>
Date: Mon, 11 Sep 2023 15:08:01 -0500
Subject: [PATCH] Rearranging the order so mounting the vol happens before
 ansible run

---
 main.tf | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/main.tf b/main.tf
index 072b231..ac4705f 100644
--- a/main.tf
+++ b/main.tf
@@ -147,6 +147,14 @@ provisioner "remote-exec" {
    ]
   }
 
+provisioner "remote-exec" {
+    inline = [
+      "sudo mount ${module.create-ohpc-instance.device}1 /var/lib/mysql",
+      "sudo df -h",
+      "sudo systemctl restart mariadb",
+    ]
+  }
+
   # compute node registration on ohpc
   provisioner "remote-exec" {
     inline = [
@@ -162,12 +170,4 @@ provisioner "remote-exec" {
 #    "ansible-playbook -c local -i /CRI_XCBC/hosts -l `hostname -s` -e \"{'compute_nodes':[{'name':'${var.ood_instance_name}', 'ip':'${net.fixed_ip_v4}', 'mac':'${net.mac}', 'vnfs':'', 'sockets':'1', 'corespersocket':'1'}]}\" /CRI_XCBC/site-ops.yaml -b -v"]
 #  }
 
-provisioner "remote-exec" {
-    inline = [
-      "sudo mount ${module.create-ohpc-instance.device}1 /var/lib/mysql",
-      "sudo df -h",
-      "sudo systemctl restart mariadb",
-    ]
-  }
-
 }
-- 
GitLab