0c3b87f20e
This role uses skopeo to perform image operations. Also update the container roles docs to add missing documentation for the already existing upload-container-image role. Clarify some ambiguity about the registry and repository attributes of the container images data structure. Change-Id: Ib66c85daf0edacf0dd797ab34b0d629f99c7111b Co-Authored-By: James E. Blair <jim@acmegating.com>
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- name: Set docker_registry cacheable facts
|
|
set_fact:
|
|
cacheable: true
|
|
docker_registry: "127.0.0.1:5200"
|
|
docker_credentials:
|
|
username: zuul
|
|
password: testpassword
|
|
repository: testrepo
|
|
container_registry_credentials:
|
|
127.0.0.1:5200:
|
|
username: zuul
|
|
password: testpassword
|
|
repository: testrepo
|
|
|
|
- name: Install container system
|
|
include_role:
|
|
name: "ensure-{{ container_command }}"
|
|
|
|
- name: Install skopeo
|
|
include_role:
|
|
name: "ensure-skopeo"
|
|
|
|
- name: Enable insecure registries
|
|
block:
|
|
- name: Create podman configration directory
|
|
become: true
|
|
file:
|
|
state: directory
|
|
path: /etc/containers
|
|
mode: 0755
|
|
|
|
- name: Setup insecure registries
|
|
become: true
|
|
copy:
|
|
dest: /etc/containers/registries.conf
|
|
content: |
|
|
[registries.insecure]
|
|
registries = ['127.0.0.1:5200']
|
|
mode: 0644
|
|
when: container_command == 'podman'
|
|
|
|
- name: Set up a publication registry to stand in for Docker Hub
|
|
import_tasks: ../../util-tasks/run-docker-registry.yaml
|
|
vars:
|
|
registry:
|
|
host: "127.0.0.1"
|
|
port: 5200
|
|
username: zuul
|
|
password: testpassword
|
|
container_command: docker
|