Add ansible files

This commit is contained in:
Evrard Van Espen
2025-11-23 11:22:45 +00:00
parent 8fc60f9d8b
commit bc439597cb
26 changed files with 1364 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
- name: Setup GitLab
vars_files:
- secrets/gitea_secrets.yaml
- config/config_vars.yaml
hosts:
- localhost
tasks:
- name: Add GitLab chart repo
kubernetes.core.helm_repository:
name: gitlab
repo_url: "https://charts.gitlab.io/"
- name: Setup GitLab
kubernetes.core.helm:
name: gitlab
chart_ref: gitlab/gitlab
update_repo_cache: true
create_namespace: true
release_namespace: gitlab
values: "{{ lookup('template', 'files/gitlab_values.template.yaml') | from_yaml }}"
# - name: Setup GitLab service
# kubernetes.core.k8s:
# template: files/gitea_svc.template.yaml
# state: present
# - name: Get Gitea runner registration token
# uri:
# url: "https://{{ gitea.domain }}/api/v1/admin/actions/runners/registration-token"
# method: POST
# headers:
# Content-Type: "application/json"
# Authorization: "Basic {{ (gitea_admin_username + ':' + gitea_admin_password) | b64encode }}"
# body_format: json
# body:
# name: "admin-token"
# scopes: ["all"]
# register: gitea_token_response
# no_log: true
# - name: Create Gitea runner registration token secret
# kubernetes.core.k8s:
# state: present
# namespace: gitea
# definition:
# apiVersion: v1
# kind: Secret
# metadata:
# name: gitea-runner-registration-token
# type: Opaque
# data:
# token: "{{ gitea_token_response.json.token | b64encode }}"
# # - name: Setup gitea runner
# # kubernetes.core.k8s:
# # template: files/gitea_runner.template.yaml
# # state: present