18 lines
716 B
YAML
18 lines
716 B
YAML
- block:
|
|
|
|
- name: Copy kubeadm container images to dedicated project
|
|
ansible.builtin.uri:
|
|
url: https://registry.{{ vapp['metacluster.fqdn'] }}/api/v2.0/projects/kubeadm/repositories/{{ ( item | regex_findall('([^:/]+)') )[-2] }}/artifacts?from=library/{{ item | replace('/', '%2F') | replace(':', '%3A') }}
|
|
method: POST
|
|
headers:
|
|
Authorization: "Basic {{ ('admin:' ~ vapp['metacluster.password']) | b64encode }}"
|
|
body:
|
|
from: "{{ item }}"
|
|
loop: "{{ lookup('ansible.builtin.file', '/opt/metacluster/cluster-api/imagelist').splitlines() }}"
|
|
|
|
module_defaults:
|
|
ansible.builtin.uri:
|
|
validate_certs: no
|
|
status_code: [200, 201, 409]
|
|
body_format: json
|