This commit is contained in:
parent
d5c886f02b
commit
b2ceee8720
@ -55,11 +55,6 @@
|
||||
chdir: /opt/metacluster/container-images
|
||||
loop: "{{ imagetarballs.files }}"
|
||||
|
||||
# - name: Delete redundant files
|
||||
# ansible.builtin.file:
|
||||
# path: /opt/metacluster/container-images
|
||||
# state: absent
|
||||
|
||||
- name: Install longhorn chart
|
||||
kubernetes.core.helm:
|
||||
name: longhorn
|
||||
@ -96,6 +91,34 @@
|
||||
notary:
|
||||
enabled: false
|
||||
|
||||
- name: Push images to registry
|
||||
ansible.builtin.shell:
|
||||
cmd: |>
|
||||
skopeo copy \
|
||||
--dest-tls-verify=false \
|
||||
--dest-creds admin:{{ vapp['guestinfo.rootpw'] }} \
|
||||
docker-archive:./{{ item }} \
|
||||
docker://registry.{{ vapp['guestinfo.fqdn'] }}/library/$( \
|
||||
k3s ctr run \
|
||||
--rm \
|
||||
--mount type=bind,src=$PWD,dst=/data,options=rbind:ro \
|
||||
quay.io/skopeo/stable:v1.8.0 \
|
||||
skopeo-{{ lookup('community.general.random_string', length=5) }} \
|
||||
skopeo list-tags /data/{{ item }} | \
|
||||
jq -r '.Tags[0]')
|
||||
chdir: /opt/metacluster/container-images/
|
||||
register: results
|
||||
ignore_errors: yes
|
||||
loop: "{{ imagetarballs.files }}"
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: results
|
||||
|
||||
#- name: Delete container image tarballs/archives
|
||||
# ansible.builtin.file:
|
||||
# path: /opt/metacluster/container-images
|
||||
# state: absent
|
||||
|
||||
- name: Cleanup tempfile
|
||||
ansible.builtin.file:
|
||||
path: "{{ kubeconfig.path }}"
|
||||
|
Loading…
Reference in New Issue
Block a user