Skip to content

Provision e2e

Provision e2e #17

Workflow file for this run

name: Provision Environment
run-name: Provision ${{ inputs.environment }}
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to provision'
required: true
default: 'e2e'
type: choice
options:
- e2e
- staging
- production
- development
- qa
tags:
description: 'Tags to apply to the provisioned resources'
required: true
default: all
type: choice
options:
- all
- updates
- users
- application
- tools
- fail2ban
- data-partition
- ufw
- decrypt-on-boot
- k8s
- debug
jobs:
provision:
runs-on: ubuntu-24.04
steps:
- name: Collect ssh key from secrets
run: |
echo "${{ secrets.SSH_KEY }}" > /tmp/id_rsa
chmod 600 /tmp/id_rsa
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
- name: checkout repository
uses: actions/checkout@v4
- name: Run Ansible Playbook
run: |
ansible-playbook infrastructure/server-setup/playbook-k8s.yml \
-i infrastructure/server-setup/inventory/e2e-test.yml \
${{ inputs.tags != 'all' && format('--tags={0}', inputs.tags) || ''}} \
--private-key /tmp/id_rsa \
--extra-vars="ansible_user=provision"