Adjusting provisioner scripts
This commit is contained in:
parent
75ad938a1b
commit
65cd9c2b0d
1 changed files with 4 additions and 2 deletions
|
|
@ -72,6 +72,10 @@ resource "null_resource" "talos_cluster" {
|
||||||
command = <<EOT
|
command = <<EOT
|
||||||
set -e # Exit on error
|
set -e # Exit on error
|
||||||
|
|
||||||
|
# Cleaning up any existing configs for this cluster
|
||||||
|
chmod +x ${path.module}/cleanup.sh
|
||||||
|
${path.module}/cleanup.sh ${self.triggers.cluster_name}
|
||||||
|
|
||||||
# Now create the cluster
|
# Now create the cluster
|
||||||
echo "Creating new cluster..."
|
echo "Creating new cluster..."
|
||||||
sudo --preserve-env=HOME talosctl cluster create \
|
sudo --preserve-env=HOME talosctl cluster create \
|
||||||
|
|
@ -92,8 +96,6 @@ resource "null_resource" "talos_cluster" {
|
||||||
provisioner "local-exec" {
|
provisioner "local-exec" {
|
||||||
when = destroy
|
when = destroy
|
||||||
command = <<EOT
|
command = <<EOT
|
||||||
|
|
||||||
# Call cleanup script
|
|
||||||
chmod +x ${path.module}/cleanup.sh
|
chmod +x ${path.module}/cleanup.sh
|
||||||
${path.module}/cleanup.sh ${self.triggers.cluster_name}
|
${path.module}/cleanup.sh ${self.triggers.cluster_name}
|
||||||
EOT
|
EOT
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue