--- - name: Copy Private Registry Directroy ansible.posix.synchronize: src: "{{ role_path }}/files/images" dest: /tmp/ - name: Install CNI_PLUGIN ansible.builtin.shell: | mkdir -p /opt/cni/bin wget hostvars[groups['all'][0]]['ip']/cni-plugins-linux-amd64-v1.3.0.tgz /opt/cni/bin/ tar -C /opt/cni/bin/ -vzxf /opt/cni/bin/cni-plugins-linux-amd64-v1.3.0.tgz - name: Load Registry image ansible.builtin.shell: | nerdctl load -i /tmp/images/registry.tar nerdctl load -i /tmp/images/browser.tar - name: Start Private Registry ansible.builtin.shell: | nerdctl run -d -p 0.0.0.0:5000:5000 --name exem-private-registry --restart always --privileged -v /tmp/images/data:/var/lib/registry -e REGISTRY_STORAGE_DELETE_ENABLED=true registry:2.8.2 nerdctl run -d -p 8888:8080 --name exem-registry-browser -e DOCKER_REGISTRY_URL=http://{{ hostvars[groups['all'][0]]['ip'] }}:5000 -e NO_SSL_VERIFICATION=true -e ENABLE_DELETE_IMAGES=true klausmeyer/docker-registry-browser - debug: msg: | "Registry Address : {{ hostvars[groups['all'][0]]['ip'] }}:5000" "TEST : curl {{ hostvars[groups['all'][0]]['ip'] }}:5000/v2/_catalog" "Web UI : http://{{ hostvars[groups['all'][0]]['ip'] }}:8888"