Copy kubeadm images to separate project
This commit is contained in:
parent
deb524d1f5
commit
f03e0c3bda
@ -1,5 +1,5 @@
|
||||
clusterConfiguration:
|
||||
imageRepository: registry.<fqdn>/library
|
||||
imageRepository: registry.<fqdn>/kubeadm
|
||||
|
||||
files:
|
||||
- [...]
|
||||
|
@ -1,3 +1,4 @@
|
||||
- import_tasks: hypervisor.yml
|
||||
- import_tasks: registry.yml
|
||||
- import_tasks: clusterapi.yml
|
||||
- import_tasks: nodetemplates.yml
|
||||
|
@ -23,15 +23,15 @@
|
||||
ansible.builtin.set_fact:
|
||||
kubeadm_images: "{{ lookup('ansible.builtin.file', '/opt/metacluster/cluster-api/imagelist').splitlines() }}"
|
||||
|
||||
# - name: Copy all stored rancher 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={{ item | replace('/', '%2F') | replace(':', '%3A') }}
|
||||
# method: POST
|
||||
# headers:
|
||||
# Authorization: "Basic {{ ('admin:' + vapp['metacluster.password']) | b64encode }}"
|
||||
# body:
|
||||
# from: "{{ item }}"
|
||||
# loop: "{{ kubeadm_images }}"
|
||||
- name: Copy all stored rancher 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: "{{ kubeadm_images }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
Loading…
Reference in New Issue
Block a user