ansible/roles/harbor/tasks/main.yaml

26 lines
841 B
YAML

- 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
kubernetes.core.helm:
create_namespace: true
release_namespace: "{{ harbor_namespace | default(namespace) }}"
release_name: "{{ harbor_name | default('harbor') }}"
chart_ref: "{{ harbor_chart_ref }}"
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 }}"