2021-01-09 17:54:42 +00:00
|
|
|
- name: Import secret.yaml to obtain secrets
|
|
|
|
include_tasks: secrets.yaml
|
|
|
|
when:
|
|
|
|
- gitea_use_external_db
|
2021-01-25 01:58:20 +00:00
|
|
|
- postgres_enabled is defined and postgres_enabled
|
2021-01-09 17:54:42 +00:00
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
gitea_combined_values: "{{ gitea_default_values | combine(gitea_values, recursive=true) }}"
|
|
|
|
|
2021-01-25 18:24:14 +00:00
|
|
|
- set_fact:
|
2021-02-04 19:47:34 +00:00
|
|
|
gitea_combined_values: "{{ gitea_combined_values | combine(gitea_external_db_values, recursive=true) }}"
|
2021-01-25 18:24:14 +00:00
|
|
|
when: gitea_use_external_db
|
|
|
|
|
2021-01-09 17:54:42 +00:00
|
|
|
- set_fact:
|
|
|
|
gitea_dns_combined_values: "{{ gitea_dns_default_values | combine(gitea_dns_values, recursive=true) }}"
|
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
gitea_ingress_nginx_combined_values: "{{ gitea_ingress_nginx_default_values | combine(gitea_ingress_nginx_values, recursive=true) }}"
|
|
|
|
|
|
|
|
- set_fact:
|
2021-01-25 01:15:32 +00:00
|
|
|
gitea_ingress_nginx_combined_values: "{{ gitea_ingress_nginx_combined_values | combine(gitea_publish_ingress_nginx_values, recursive=true) }}"
|
|
|
|
when: gitea_publish_web
|
2021-01-09 17:54:42 +00:00
|
|
|
|
|
|
|
- name: Deploy Nginx Ingress for Gitea
|
|
|
|
community.kubernetes.helm:
|
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ gitea_ingress_nginx_namespace | default(namespace) }}"
|
2021-01-25 18:04:57 +00:00
|
|
|
release_name: "{{ gitea_ingress_nginx_release_name | default(namespace + '-gitea-ingress-nginx') }}"
|
2021-01-09 17:54:42 +00:00
|
|
|
chart_ref: "{{ gitea_ingress_nginx_chart | default('ingress-nginx/ingress-nginx') }}"
|
|
|
|
chart_version: "{{ gitea_ingress_nginx_version | default(omit) }}"
|
|
|
|
release_values: "{{ gitea_ingress_nginx_combined_values | from_yaml }}"
|
|
|
|
wait: true
|
|
|
|
|
|
|
|
- name: Deploy DNS for Gitea
|
|
|
|
community.kubernetes.helm:
|
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ gitea_dns_namespace | default(namespace) }}"
|
2021-01-25 18:04:57 +00:00
|
|
|
release_name: "{{ gitea_dns_relase_name | default(namespace + '-gitea-internal-dns') }}"
|
2021-01-09 17:54:42 +00:00
|
|
|
chart_ref: "{{ gitea_dns_chart | default('bitnami/external-dns') }}"
|
|
|
|
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
|
|
|
|
community.kubernetes.helm:
|
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ gitea_namespace | default(namespace) }}"
|
2021-01-25 18:04:57 +00:00
|
|
|
release_name: "{{ gitea_release_name | default(namespace + '-gitea') }}"
|
|
|
|
chart_ref: "{{ gitea_chart | default('gitea-charts/gitea') }}"
|
2021-01-09 17:54:42 +00:00
|
|
|
chart_version: "{{ gitea_version | default(omit) }}"
|
|
|
|
release_values: "{{ gitea_combined_values | from_yaml }}"
|
2021-01-25 18:04:57 +00:00
|
|
|
#wait: true
|
2021-01-09 17:54:42 +00:00
|
|
|
|