tripleo-ansible/tripleo_ansible/roles/tripleo-container-image-pre.../molecule/build/prepare.yml

44 lines
1.4 KiB
YAML

---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Prepare
hosts: all
roles:
- role: test_deps
test_deps_setup_tripleo: true
when:
- inventory_hostname != "registry"
post_tasks:
- name: Install docker
package:
name: docker
state: present
- name: Create buildah directory
file:
path: /etc/containers
state: directory
- name: Create buildah registries config
copy:
content: |-
[registries.search]
registries = ['docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.access.redhat.com', 'registry.centos.org']
[registries.insecure]
registries = ["{{ hostvars['registry']['ansible_default_ipv4']['address'] }}:5000"]
[registries.block]
registries = []
dest: /etc/containers/registries.conf