mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 09:58:31 +01:00
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
- name: Install Docker prerequisites
|
|
apt:
|
|
state: present
|
|
pkg:
|
|
- docker.io
|
|
- docker-compose
|
|
|
|
- set_fact:
|
|
harbor_version: v2.10.0
|
|
harbor_file: harbor-online-installer-{{ harbor_version }}.tgz
|
|
|
|
- name: Create /data/ dir
|
|
file:
|
|
path: /data/
|
|
state: directory
|
|
|
|
- name: Download release
|
|
get_url:
|
|
url: https://github.com/goharbor/harbor/releases/download/{{ harbor_version }}/{{ harbor_file }}
|
|
dest: /opt/{{ harbor_file }}
|
|
|
|
- name: Extract release
|
|
unarchive:
|
|
remote_src: true
|
|
src: /opt/harbor-online-installer-v2.10.0.tgz
|
|
dest: /opt/harbor/
|
|
|
|
- name: Copy harbor config
|
|
template:
|
|
src: harbor.config.yaml
|
|
dest: /opt/harbor/harbor.yaml
|
|
|
|
- name: run installer
|
|
shell:
|
|
cmd: ./install.sh
|
|
chdir: /opt/harbor/
|
|
|
|
- name: Read in OIDC-json
|
|
set_fact:
|
|
oidc_config_json: "{{ lookup('file','harbor-oidc.json') | from_json }}"
|
|
|
|
- name: Inject OIDC Config
|
|
line_in_file:
|
|
file: /opt/harbor/common/config/core/env
|
|
line: CONFIG_OVERWRITE_JSON={{ oidc_config_json }}
|
|
notify: restart harbor
|