Danny Bessems
ad993ebda5
Some checks reported errors
continuous-integration/drone/push Build encountered an error
39 lines
971 B
YAML
39 lines
971 B
YAML
- name: Download Harbor installer
|
|
get_url:
|
|
url: https://github.com/goharbor/harbor/releases/download/{{ harbor.version }}/harbor-online-installer-{{ harbor.version }}.tgz
|
|
dest: /tmp/harbor-installer.tgz
|
|
mode: '0777'
|
|
|
|
- name: Extract installer
|
|
unarchive:
|
|
src: /tmp/harbor-installer.tgz
|
|
dest: /opt
|
|
remote_src: yes
|
|
|
|
- name: Copy Harbor configuration file and public/private keys
|
|
copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
backup: "{{ item.backup }}"
|
|
with_items:
|
|
- src: harbor.yml
|
|
dest: /opt/harbor
|
|
backup: yes
|
|
- src: /certificates/*.bessems.eu/certificate.crt
|
|
dest: /opt/harbor
|
|
backup: no
|
|
- src: /certificates/*.bessems.eu/privatekey.key
|
|
dest: /opt/harbor
|
|
backup: no
|
|
|
|
- name: Install Harbor
|
|
shell:
|
|
cmd: /opt/harbor/install.sh --with-trivy
|
|
# environment:
|
|
# TERM: dumb
|
|
|
|
- name: Delete temporary files
|
|
file:
|
|
path: /tmp/harbor-installer.tgz
|
|
state: absent
|