Compare commits
2 Commits
bbd103d527
...
95dea97382
| Author | SHA1 | Date | |
|---|---|---|---|
| 95dea97382 | |||
| a840306245 |
@@ -102,22 +102,21 @@
|
|||||||
k3s ctr run \
|
k3s ctr run \
|
||||||
--rm \
|
--rm \
|
||||||
--mount type=bind,src=$PWD,dst=/data,options=rbind:ro \
|
--mount type=bind,src=$PWD,dst=/data,options=rbind:ro \
|
||||||
quay.io/skopeo/stable:v1.8.0 \
|
quay.io/skopeo/stable:v1.8.0 skopeo \
|
||||||
skopeo-{{ lookup('community.general.random_string', length=5) }} \
|
skopeo list-tags docker-archive:/data/{{ item }} | \
|
||||||
skopeo list-tags /data/{{ item }} | \
|
|
||||||
jq -r '.Tags[0]')
|
jq -r '.Tags[0]')
|
||||||
chdir: /opt/metacluster/container-images/
|
chdir: /opt/metacluster/container-images/
|
||||||
register: results
|
register: results
|
||||||
ignore_errors: yes
|
# ignore_errors: yes
|
||||||
loop: "{{ imagetarballs.files }}"
|
loop: "{{ imagetarballs.files }}"
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
var: results
|
var: results
|
||||||
|
|
||||||
#- name: Delete container image tarballs/archives
|
- name: Delete container image tarballs/archives
|
||||||
# ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
# path: /opt/metacluster/container-images
|
path: /opt/metacluster/container-images
|
||||||
# state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Cleanup tempfile
|
- name: Cleanup tempfile
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: skopeo copy docker://{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
|
cmd: skopeo copy docker://{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
|
||||||
chdir: /opt/metacluster/container-images
|
chdir: /opt/metacluster/container-images
|
||||||
loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten + dependencies.container_images}}"
|
loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten + dependencies.container_images }}"
|
||||||
|
|
||||||
- name: Compress tarballs
|
- name: Compress tarballs
|
||||||
community.general.archive:
|
community.general.archive:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
vcenter_server = "bv11-vc.bessems.lan"
|
vcenter_server = "bv11-vc.bessems.lan"
|
||||||
vsphere_username = "administrator@vsphere.local"
|
vsphere_username = "administrator@vsphere.local"
|
||||||
vsphere_datacenter = "DeSchakel"
|
vsphere_datacenter = "DeSchakel"
|
||||||
vsphere_cluster = "Cluster.Legacy"
|
vsphere_cluster = "Cluster.01"
|
||||||
vsphere_host = "bv11-esx.bessems.lan"
|
vsphere_host = "bv11-esx02.bessems.lan"
|
||||||
vsphere_datastore = "ESX00.SSD01"
|
vsphere_datastore = "NAS01.RAID5"
|
||||||
vsphere_folder = "/Packer"
|
vsphere_folder = "/Packer"
|
||||||
vsphere_templatefolder = "/Templates"
|
vsphere_templatefolder = "/Templates"
|
||||||
vsphere_network = "LAN"
|
vsphere_network = "LAN"
|
||||||
|
|||||||
Reference in New Issue
Block a user