From b7a5805fd8a91bd98718209aa9ddc8f51c6a8507 Mon Sep 17 00:00:00 2001 From: Alexandre Pires Date: Tue, 1 Oct 2024 23:38:01 +0200 Subject: [PATCH] Refactor workflow file to include Ansible environment setup and get host info action, and setup Kubernetes environment --- .../workflows/terraform-microk8s-validate.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/terraform-microk8s-validate.yml b/.github/workflows/terraform-microk8s-validate.yml index 4fc5398..e4bf785 100644 --- a/.github/workflows/terraform-microk8s-validate.yml +++ b/.github/workflows/terraform-microk8s-validate.yml @@ -29,13 +29,29 @@ jobs: - name: Setup environment uses: ./.github/actions/setup-env + - name: Setup Ansible Environment + id: setup_ansible_env + uses: ./.github/actions/setup-ansible-env + with: + vault-master-password: ${{ secrets.VAULT_MASTER_PASSWORD }} + ansible-user: ${{ secrets.ANSIBLE_USER }} + host-group: microk8s + - name: Setup Terraform Environment uses: ./.github/actions/setup-terraform-env + - name: Setup Kubernetes Environment + uses: ./.github/actions/setup-k8s-env + with: + vault-master-password: ${{ secrets.VAULT_MASTER_PASSWORD }} + ansible-user: ${{ secrets.ANSIBLE_USER }} + - name: Terraform Init and Validate env: VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }} run: | cd terraform/k8sapps sectool exec terraform init - terraform validate + sectool exec terraform validate + sectool exec terraform fmt -check + sectool exec terraform plan