ansible/roles/gitea/tasks/main.yaml

55 lines
2.3 KiB
YAML
Raw Permalink Normal View History

2021-01-09 17:54:42 +00:00
- name: Import secret.yaml to obtain secrets
include_tasks: secrets.yaml
when:
- gitea_use_external_db
- postgres_enabled is defined and postgres_enabled
2021-01-09 17:54:42 +00:00
- set_fact:
2024-05-25 15:12:30 +00:00
gitea_combined_values: "{{ gitea_default_values | combine(gitea_values | default({}), recursive=true) }}"
2021-01-09 17:54:42 +00:00
- set_fact:
2024-05-25 15:12:30 +00:00
gitea_combined_values: "{{ gitea_combined_values | combine(gitea_external_db_values | default({}), recursive=true) }}"
when: gitea_use_external_db
2021-01-09 17:54:42 +00:00
- set_fact:
2024-05-25 15:12:30 +00:00
gitea_dns_combined_values: "{{ gitea_dns_default_values | combine(gitea_dns_values | default({}), recursive=true) }}"
2021-01-09 17:54:42 +00:00
- set_fact:
2024-05-25 15:12:30 +00:00
gitea_ingress_nginx_combined_values: "{{ gitea_ingress_nginx_default_values | combine(gitea_ingress_nginx_values | default({}), recursive=true) }}"
2021-01-09 17:54:42 +00:00
- set_fact:
2024-05-25 15:12:30 +00:00
gitea_ingress_nginx_combined_values: "{{ gitea_ingress_nginx_combined_values | combine(gitea_publish_ingress_nginx_values | default({}), recursive=true) }}"
when: gitea_publish_web
2021-01-09 17:54:42 +00:00
- name: Deploy Nginx Ingress for Gitea
2022-07-12 13:48:14 +00:00
kubernetes.core.helm:
2021-01-09 17:54:42 +00:00
create_namespace: true
release_namespace: "{{ gitea_ingress_nginx_namespace | default(namespace) }}"
release_name: "{{ gitea_ingress_nginx_release_name | default(namespace + '-gitea-ingress-nginx') }}"
chart_ref: "{{ gitea_ingress_nginx_chart_ref }}"
2021-01-09 17:54:42 +00:00
chart_version: "{{ gitea_ingress_nginx_version | default(omit) }}"
release_values: "{{ gitea_ingress_nginx_combined_values | from_yaml }}"
wait: true
- name: Deploy DNS for Gitea
2022-07-12 13:48:14 +00:00
kubernetes.core.helm:
2021-01-09 17:54:42 +00:00
create_namespace: true
release_namespace: "{{ gitea_dns_namespace | default(namespace) }}"
release_name: "{{ gitea_dns_relase_name | default(namespace + '-gitea-internal-dns') }}"
chart_ref: "{{ gitea_dns_chart_ref }}"
2021-01-09 17:54:42 +00:00
chart_version: "{{ gitea_dns_version | default(omit) }}"
release_values: "{{ gitea_dns_combined_values | from_yaml }}"
wait: true
when: gitea_publish_web == false
- name: Deploy Gitea
2022-07-12 13:48:14 +00:00
kubernetes.core.helm:
2021-01-09 17:54:42 +00:00
create_namespace: true
release_namespace: "{{ gitea_namespace | default(namespace) }}"
release_name: "{{ gitea_release_name | default(namespace + '-gitea') }}"
chart_ref: "{{ gitea_chart_ref }}"
2021-01-09 17:54:42 +00:00
chart_version: "{{ gitea_version | default(omit) }}"
release_values: "{{ gitea_combined_values | from_yaml }}"
#wait: true
2021-01-09 17:54:42 +00:00