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