mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 06:48:33 +01:00
feat: harbor setup done
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
- 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/
|
||||
@@ -23,24 +19,26 @@
|
||||
unarchive:
|
||||
remote_src: true
|
||||
src: /opt/harbor-online-installer-v2.10.0.tgz
|
||||
dest: /opt/harbor/
|
||||
dest: /opt/
|
||||
register: release
|
||||
|
||||
- name: Copy harbor config
|
||||
template:
|
||||
src: harbor.config.yaml
|
||||
dest: /opt/harbor/harbor.yaml
|
||||
dest: /opt/harbor/harbor.yml # mind the missing a
|
||||
register: config
|
||||
|
||||
- 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 }}"
|
||||
when: config.changed or release.changed
|
||||
notify: restart harbor
|
||||
|
||||
- name: Inject OIDC Config
|
||||
line_in_file:
|
||||
file: /opt/harbor/common/config/core/env
|
||||
line: CONFIG_OVERWRITE_JSON={{ oidc_config_json }}
|
||||
lineinfile:
|
||||
state: present
|
||||
path: /opt/harbor/common/config/core/env
|
||||
line: CONFIG_OVERWRITE_JSON={{ lookup('file','harbor-oidc.json') | from_json | to_json }}
|
||||
regex: CONFIG_OVERWRITE_JSON=
|
||||
notify: restart harbor
|
||||
|
||||
Reference in New Issue
Block a user