Skip to content
Snippets Groups Projects

Feat trim tf deploy

Open Eesaan Atluri requested to merge feat-trim-tf-deploy into master
1 file
+ 1
15
Compare changes
  • Side-by-side
  • Inline
+ 1
15
@@ -70,18 +70,6 @@ module "create-ohpc-instance" {
vol_id = data.openstack_blockstorage_volume_v2.disk.id
}
# runs the nodes module - creates nodes using variables defined above
# calls functions from cluster-network and import-keypair modules to get values created there for use
module "nodes" {
internal_subnet_id = "${module.cluster-network.internal_subnet_id}"
source = "./nodes"
image_compute = var.image_compute
flavor = var.flavor
key_pair = module.import-keypair.keypair_name
compute_node_count = var.compute_node_count
internal_network = "${module.cluster-network.internal_network_id}"
}
# calls the outputs defined in the ohpc-instance module
output "ohpc-ssh_host" {
value = module.create-ohpc-instance.ssh_host
@@ -96,7 +84,6 @@ output "xdmod_instance_id" {
resource "null_resource" "ops" {
triggers = {
ohpc_instance = module.create-ohpc-instance.xdmod_instance_id
compute_instances = join(",", module.nodes.id)
}
connection {
@@ -131,8 +118,7 @@ provisioner "remote-exec" {
# compute node registration on ohpc
provisioner "remote-exec" {
inline = [
for node, net in module.nodes.network:
"ansible-playbook -c local -i /CRI_XCBC/hosts -l `hostname -s` -e \"{'cod_deploy':'false', 'compute_nodes':[{'name':'${node}', 'ip':'${net[0].fixed_ip_v4}', 'mac':'${net[0].mac}', 'vnfs':'', 'sockets':'1', 'corespersocket':'1'}]}\" /CRI_XCBC/site-ops.yaml -b -v"
"ansible-playbook -c local -i /CRI_XCBC/hosts -l `hostname -s` -e \"{'cod_deploy':'false',}\" /CRI_XCBC/site-ops.yaml -b -v"
]
}
}
Loading