Add ansible files
This commit is contained in:
57
ansible/04_setup_gitlab.yaml
Normal file
57
ansible/04_setup_gitlab.yaml
Normal 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
|
||||
Reference in New Issue
Block a user