Refactor file path in actions-validate.yml and add input parameters for vault master password, ansible user, and trusted hosts
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
name: Setup K8S Environment
|
||||
description: Prepare the environment for A13labs CI/CD pipelines
|
||||
inputs:
|
||||
vault-master-password:
|
||||
description: "The master password for the vault"
|
||||
required: true
|
||||
ansible-user:
|
||||
description: "The user to use for Ansible"
|
||||
required: true
|
||||
k8s-target:
|
||||
description: "The target host to deploy the K8S applications"
|
||||
default: "microk8s"
|
||||
@@ -11,8 +17,8 @@ runs:
|
||||
- name: Copy Kube Config from remote host
|
||||
shell: bash
|
||||
env:
|
||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
|
||||
VAULT_MASTER_PASSWORD: ${{ inputs.vault-master-password }}
|
||||
ANSIBLE_USER: ${{ inputs.ansible-user }}
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
run: |
|
||||
mkdir -p ~/.kube
|
||||
@@ -21,7 +27,7 @@ runs:
|
||||
- name: Terraform Init
|
||||
shell: bash
|
||||
env:
|
||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
VAULT_MASTER_PASSWORD: ${{ inputs.vault-master-password }}
|
||||
run: |
|
||||
cd terraform/k8sapps
|
||||
sectool exec terraform init
|
||||
@@ -29,8 +35,8 @@ runs:
|
||||
- name: Terraform Apply
|
||||
shell: bash
|
||||
env:
|
||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
|
||||
VAULT_MASTER_PASSWORD: ${{ inputs.vault-master-password }}
|
||||
ANSIBLE_USER: ${{ inputs.ansible-user }}
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
run: |
|
||||
# Get Hostname and IP address of the target
|
||||
|
||||
Reference in New Issue
Block a user