David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 1 | - name: Directories are present |
| 2 | file: |
| 3 | path: "{{ item }}" |
| 4 | state: directory |
| 5 | recurse: yes |
| 6 | with_items: |
| 7 | - /data/registry-mirror/conf |
| 8 | tags: [registry] |
| 9 | |
| 10 | - name: Configuration is copied |
| 11 | copy: |
| 12 | src: mirror-config.yml |
| 13 | dest: /data/registry-mirror/conf/config.yml |
| 14 | tags: [registry] |
| 15 | |
| 16 | - name: Registry container is running |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 17 | docker_container: |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 18 | name: registry |
| 19 | image: registry:2.4.0 |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 20 | ports: |
| 21 | - "5000:5000" |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 22 | volumes: |
| 23 | - /vagrant/registry:/var/lib/registry/docker/registry |
| 24 | - /data/registry/conf:/conf |
| 25 | tags: [registry] |
| 26 | |
| 27 | - name: Mirror container is running |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 28 | docker_container: |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 29 | name: registry-mirror |
| 30 | image: registry:2.4.0 |
Zack Williams | 6fe4637 | 2017-06-29 08:30:21 -0700 | [diff] [blame] | 31 | ports: |
| 32 | - "5001:5000" |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 33 | volumes: |
| 34 | - /vagrant/registry-mirror:/var/lib/registry/docker/registry |
| 35 | - /data/registry-mirror/conf:/conf |
| 36 | command: /conf/config.yml |
| 37 | tags: [registry] |