Jonathan Hart | 93956f5 | 2017-08-22 13:12:42 -0700 | [diff] [blame] | 1 | |
| 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. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 17 | - 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 Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 33 | docker_container: |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 34 | name: registry |
| 35 | image: registry:2.4.0 |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 36 | ports: |
| 37 | - "5000:5000" |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 38 | 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 Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 44 | docker_container: |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 45 | name: registry-mirror |
| 46 | image: registry:2.4.0 |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 47 | ports: |
| 48 | - "5001:5000" |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 49 | volumes: |
| 50 | - /vagrant/registry-mirror:/var/lib/registry/docker/registry |
| 51 | - /data/registry-mirror/conf:/conf |
| 52 | command: /conf/config.yml |
| 53 | tags: [registry] |