diff --git a/.gitea/workflows/destroy_module.yml b/.gitea/workflows/destroy_module.yml index b6eaf38..f737840 100644 --- a/.gitea/workflows/destroy_module.yml +++ b/.gitea/workflows/destroy_module.yml @@ -9,6 +9,15 @@ on: default: "terraform" type: string + tfvars_file: + description: "Which tfvars file to use" + required: true + default: "single.tfvars.example" + type: choice + options: + - single.tfvars.example + - multi.tfvars.example + jobs: destroy: runs-on: ubuntu-latest @@ -22,6 +31,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Check files & Select tfvars + shell: bash + run: | + #rm ansible/inventory/inventory.yml + mkdir -p ansible/inventory + cd terraform + #rm vm_data.yml + cp "${{ inputs.tfvars_file || 'single.tfvars.example' }}" terraform.tfvars + - name: Setup Terraform uses: hashicorp/setup-terraform@v4