blob: 543c9bb48f103882632472b2a6a5ef0674a00c06 [file] [log] [blame]
Jonathan Hart93956f52017-08-22 13:12:42 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
David K. Bainbridgeb5415042016-05-13 17:06:10 -070017- name: Directories are present
18 file:
19 path: "{{ item }}"
20 state: directory
21 recurse: yes
22 with_items:
23 - /data/registry-mirror/conf
24 tags: [registry]
25
26- name: Configuration is copied
27 copy:
28 src: mirror-config.yml
29 dest: /data/registry-mirror/conf/config.yml
30 tags: [registry]
31
32- name: Registry container is running
Zack Williams6fe46372017-06-29 08:30:21 -070033 docker_container:
David K. Bainbridgeb5415042016-05-13 17:06:10 -070034 name: registry
35 image: registry:2.4.0
Zack Williams6fe46372017-06-29 08:30:21 -070036 ports:
37 - "5000:5000"
David K. Bainbridgeb5415042016-05-13 17:06:10 -070038 volumes:
39 - /vagrant/registry:/var/lib/registry/docker/registry
40 - /data/registry/conf:/conf
41 tags: [registry]
42
43- name: Mirror container is running
Zack Williams6fe46372017-06-29 08:30:21 -070044 docker_container:
David K. Bainbridgeb5415042016-05-13 17:06:10 -070045 name: registry-mirror
46 image: registry:2.4.0
Zack Williams6fe46372017-06-29 08:30:21 -070047 ports:
48 - "5001:5000"
David K. Bainbridgeb5415042016-05-13 17:06:10 -070049 volumes:
50 - /vagrant/registry-mirror:/var/lib/registry/docker/registry
51 - /data/registry-mirror/conf:/conf
52 command: /conf/config.yml
53 tags: [registry]