diff --git a/main.tf b/main.tf index 375c402b0e6de7e1b4e2660858c9bf22d66a449b..d70429e1cc58a05406be46939d72590efb06b920 100644 --- a/main.tf +++ b/main.tf @@ -157,4 +157,13 @@ provisioner "remote-exec" { # for net in module.create-ood-instance.network: # "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", + ] + } + } diff --git a/ohpc-instance/main.tf b/ohpc-instance/main.tf index 2d4b159d59c6d3d09698a5ad10c0fd5f8c5ebc08..b2ea0f1d02990238b2e9c919af0c1dae15823c52 100644 --- a/ohpc-instance/main.tf +++ b/ohpc-instance/main.tf @@ -74,3 +74,7 @@ output "id" { output "ssh_host" { value = var.floating_ip_ohpc } + +output "device" { + value = openstack_compute_volume_attach_v2.volume_attach.device +}