2021-02-01 18:17:48 +00:00
|
|
|
- name: Import secret.yaml to obtain secrets
|
|
|
|
include_tasks: secrets.yaml
|
|
|
|
when:
|
|
|
|
- harbor_use_external_db
|
|
|
|
- postgres_enabled is defined and postgres_enabled
|
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
harbor_combined_values: "{{ harbor_default_values | combine(harbor_values, recursive=true) }}"
|
|
|
|
|
|
|
|
- name: Deploy Harbor
|
2022-07-12 13:48:14 +00:00
|
|
|
kubernetes.core.helm:
|
2021-02-01 18:17:48 +00:00
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ harbor_namespace | default(namespace) }}"
|
|
|
|
release_name: "{{ harbor_name | default('harbor') }}"
|
|
|
|
chart_ref: "{{ harbor_chart | default('harbor/harbor') }}"
|
|
|
|
chart_version: "{{ harbor_version | default(omit) }}"
|
|
|
|
release_values: "{{ harbor_combined_values | from_yaml }}"
|
|
|
|
wait: true
|
|
|
|
|
|
|
|
- name: Deploy readonly public ingress for Harbor
|
|
|
|
when: harbor_readonly_ingress is defined
|
|
|
|
k8s:
|
|
|
|
state: present
|
|
|
|
definition:
|
|
|
|
"{{ harbor_readonly_ingress_definition }}"
|