diff --git a/main.tf b/main.tf index 8fee4aed193c1f26ea603b33f8834ec85fc538e4..c9605ac8ad9b954ee2724d7a640af8a628516749 100644 --- a/main.tf +++ b/main.tf @@ -133,12 +133,15 @@ resource "null_resource" "ops" { } # 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" -# ] -# } + provisioner "remote-exec" { + inline = [ + # Git clone command to clone the repository to the root directory + "git clone https://github.com/jprorama/CRI_XCBC.git /", + + 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" + ] + } # ood node # provisioner "remote-exec" { diff --git a/ohpc-instance/main.tf b/ohpc-instance/main.tf index b2766f96359bfc204b77cef4ed165e1d197547c6..a969f921b40d67010a05e5447660b6dc6e535ab6 100644 --- a/ohpc-instance/main.tf +++ b/ohpc-instance/main.tf @@ -43,10 +43,6 @@ resource "openstack_compute_instance_v2" "ohpc" { owner: centos:centos path: /etc/hosts permissions: 0644 - - content: | - git clone https://github.com/jprorama/CRI_XCBC.git / - path: / - permissions: '0755' EOF # defines the networks of the instance