Rebase dependency;Comment out redundant logic
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2022-07-27 13:33:04 +02:00
parent d6234321d9
commit 8e75925b52
5 changed files with 19 additions and 10 deletions

View File

@ -8,6 +8,8 @@
- name: Download & install static binaries - name: Download & install static binaries
ansible.builtin.get_url: ansible.builtin.get_url:
url: "{{ item.url }}" url: "{{ item.url }}"
url_username: "{{ item.username | default(omit) }}"
url_password: "{{ item.password | default(omit) }}"
dest: /usr/local/bin/{{ item.filename }} dest: /usr/local/bin/{{ item.filename }}
owner: root owner: root
group: root group: root

View File

@ -121,15 +121,14 @@
ansible.builtin.shell: ansible.builtin.shell:
cmd: >- cmd: >-
skopeo copy \ skopeo copy \
--insecure-policy \
--dest-tls-verify=false \ --dest-tls-verify=false \
--dest-creds admin:{{ vapp['guestinfo.rootpw'] }} \ --dest-creds admin:{{ vapp['guestinfo.rootpw'] }} \
docker-archive:./{{ item }} \ docker-archive:./{{ item }} \
docker://registry.{{ vapp['metacluster.fqdn'] }}/library/$( \ docker://registry.{{ vapp['metacluster.fqdn'] }}/library/$( \
k3s ctr run \ skopeo list-tags \
--rm \ --insecure-policy \
--mount type=bind,src=$PWD,dst=/data,options=rbind:ro \ docker-archive:./{{ item }} | \
quay.io/skopeo/stable:v1.8.0 skopeo \
skopeo list-tags docker-archive:/data/{{ item }} | \
jq -r '.Tags[0]') jq -r '.Tags[0]')
chdir: /opt/metacluster/container-images/ chdir: /opt/metacluster/container-images/
loop: "{{ imagetarballs.files }}" loop: "{{ imagetarballs.files }}"

View File

@ -53,7 +53,8 @@
docker://{{ item }} \ docker://{{ item }} \
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ 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 }}"
loop: "{{ (containerimages.results | map(attribute='stdout_lines') | flatten) }}"
# - name: Inject manifests # - name: Inject manifests
# ansible.builtin.template: # ansible.builtin.template:

View File

@ -125,9 +125,10 @@ dependencies:
- community.crypto - community.crypto
- community.general - community.general
- kubernetes.core - kubernetes.core
- vmware.vmware_rest
container_images: # container_images:
- quay.io/skopeo/stable:v1.8.0 # - quay.io/skopeo/stable:v1.8.0
static_binaries: static_binaries:
- filename: tea - filename: tea
@ -139,11 +140,15 @@ dependencies:
url: https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz url: https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz
archive: compressed archive: compressed
extra_opts: --strip-components=1 extra_opts: --strip-components=1
- filename: skopeo
url: https://sn.itch.fyi/Repository/rel/skopeo
username: "{{ repo_username }}"
password: "{{ repo_password }}"
- filename: yq - filename: yq
url: http://github.com/mikefarah/yq/releases/download/v4.25.3/yq_linux_amd64 url: http://github.com/mikefarah/yq/releases/download/v4.25.3/yq_linux_amd64
packages: packages:
- lvm2 - lvm2
- python3-dnspython
- python3-jmespath - python3-jmespath
- python3-passlib - python3-passlib
- skopeo

View File

@ -80,7 +80,9 @@ build {
] ]
use_proxy = "false" use_proxy = "false"
extra_arguments = [ extra_arguments = [
"--extra-vars", "ansible_ssh_pass=${var.ssh_password}" "--extra-vars", "ansible_ssh_pass=${var.ssh_password}",
"--extra-vars", "repo_username=${var.repo_username}",
"--extra-vars", "repo_password=${var.repo_password}"
] ]
} }