777230be59
This new role will be used to replace our upload-docker-image role in the future. Change-Id: I0e2b0cca6575255520aa6d4d48a12128ab5f46cc Signed-off-by: Paul Belanger <pabelanger@redhat.com>
49 lines
1.3 KiB
YAML
49 lines
1.3 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: 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
|