Skip to content
Snippets Groups Projects

Remove remote-exec provisioners in Terraform script

Compare and Show latest version
1 file
+ 8
4
Compare changes
  • Side-by-side
  • Inline
+ 8
4
@@ -132,13 +132,17 @@ resource "null_resource" "ops" {
private_key = var.ssh_private_key
}
# compute node registration on ohpc
# clone CRI_XCBC on node
provisioner "remote-exec" {
inline = [
# Git clone command to clone the repository to the root directory
"git clone https://github.com/jprorama/CRI_XCBC.git /",
"git clone https://github.com/jprorama/CRI_XCBC.git /CRI_XCBC",
]
}
for node, net in module.nodes.network:
# 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"
]
}
Loading