Refactor workflow file to include Ansible environment setup and get host info action
This commit is contained in:
@@ -29,7 +29,22 @@ jobs:
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Setup Terraform Environment
|
||||
- name: Setup Ansible environment
|
||||
uses: ./.github/actions/setup-ansible-env
|
||||
with:
|
||||
vault-master-password: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
ansible-user: ${{ secrets.ANSIBLE_USER }}
|
||||
host-group: iac
|
||||
|
||||
- name: Get Host Info
|
||||
uses: ./.github/actions/get-host-info
|
||||
id: get-host-info
|
||||
with:
|
||||
vault-master-password: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
ansible-user: ${{ secrets.ANSIBLE_USER }}
|
||||
target-host: iac
|
||||
|
||||
- name: Setup Terraform environment
|
||||
uses: ./.github/actions/setup-terraform-env
|
||||
|
||||
- name: Terraform Init and Validate
|
||||
@@ -37,6 +52,7 @@ jobs:
|
||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
run: |
|
||||
cd terraform/iac
|
||||
export TF_VAR_system_id=$SYSTEM_ID
|
||||
sectool exec terraform init
|
||||
sectool exec terraform validate
|
||||
sectool exec terraform fmt -check
|
||||
|
||||
Reference in New Issue
Block a user