--- - name: Deploy {{ svc.name }} tags: - harbor - registry block: - import_tasks: steps/create-service-directory.yml - import_tasks: steps/template-site-config.yml - name: Template config ansible.builtin.template: src: service.yml.j2 dest: "{{ (service_path, 'harbor.yml') | path_join }}" mode: "0644" - name: Download harbor ansible.builtin.unarchive: src: https://github.com/goharbor/harbor/releases/download/v{{ svc.harbor_version }}/harbor-online-installer-v{{ svc.harbor_version }}.tgz dest: "{{ service_path }}" remote_src: yes - name: Run the harbor prepare command ansible.builtin.command: cmd: "{{ service_path }}/harbor/prepare" chdir: "{{ service_path }}" environment: HARBOR_BUNDLE_DIR: "{{ service_path }}" - name: Run the harbor install command ansible.builtin.command: cmd: "{{ service_path }}/harbor/install.sh" chdir: "{{ service_path }}" environment: HARBOR_BUNDLE_DIR: "{{ service_path }}" become: true