---
- name: "Add harbor base configuration via API"
  delegate_to: 127.0.0.1
  become: false
  uri:
    url: "{{ harbor_external_url }}/api/v2.0/configurations"
    user: '{{ harbor_admin_username }}'
    password: '{{ harbor_admin_password }}'
    method: PUT
    body_format: json
    force_basic_auth: yes
    body: "{{ base_configuration }}"
    headers:
      Content-Type: application/json
    status_code: [200]
  register: base_setting
  delay: 10
  retries: 10
  until: base_setting.status in [200]
  no_log: true
