Fix issues reported by ansible-lint

This commit is contained in:
Tobias Reisinger 2023-12-13 02:43:15 +01:00
parent a90840b1dc
commit 2e100d290f
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
59 changed files with 315 additions and 244 deletions
_ansible/roles/harbor

View file

@ -4,8 +4,11 @@
- harbor
- registry
block:
- import_tasks: steps/create-service-directory.yml
- import_tasks: steps/template-site-config.yml
- name: Import prepare tasks for common service
ansible.builtin.import_tasks: tasks/prepare-common-service.yml
- name: Import tasks to template the site for the reverse proxy
ansible.builtin.import_tasks: tasks/steps/template-site-config.yml
- name: Template config
ansible.builtin.template:
@ -17,12 +20,13 @@
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
remote_src: true
- name: Run the harbor prepare command
ansible.builtin.command:
cmd: "{{ service_path }}/harbor/prepare"
chdir: "{{ service_path }}"
creates: "{{ (service_path, 'docker-compose.yml') | path_join }}"
environment:
HARBOR_BUNDLE_DIR: "{{ service_path }}"
@ -33,3 +37,4 @@
environment:
HARBOR_BUNDLE_DIR: "{{ service_path }}"
become: true
changed_when: true # TODO find way to recognize need to run install command

View file

@ -1,3 +1,4 @@
---
svc_ports:
http: 20080
https: 20443
@ -5,7 +6,8 @@ svc_ports:
svc:
name: harbor
domain: "registry.serguzim.me"
no_compose: true # TODO remove when fixing "var-naming[no-role-prefix]"
domain: registry.serguzim.me
caddy_extra: |
reverse_proxy /metrics host.docker.internal:{{ svc_ports.metrics }}
reverse_proxy host.docker.internal:{{ svc_ports.https }} {
@ -75,9 +77,9 @@ svc_yml:
max_idle_conns: 2
max_open_conns: 0
proxy:
http_proxy: null
https_proxy: null
no_proxy: null
http_proxy:
https_proxy:
no_proxy:
components:
- core
- jobservice