-
Notifications
You must be signed in to change notification settings - Fork 0
/
registry.yml
38 lines (30 loc) · 1.17 KB
/
registry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- name: Create Docker Registry and Cache Images
hosts: all
sudo: yes
vars:
registry: "10.0.3.5:5000/"
images:
- { name: castawaylabs/node-docker, tag: latest }
- { name: castawaylabs/mongodb-docker, tag: latest }
- { name: castawaylabs/redis-docker, tag: latest }
- { name: tutum/mysql, tag: 5.6 }
- { name: castawaylabs/mms-docker, tag: latest }
- { name: castawaylabs/mms-backup-docker, tag: latest }
- { name: castawaylabs/graphite-statsd, tag: latest }
tasks:
- name: Install HTTPS Support for Aptitude
apt: name=apt-transport-https state=present
- include: tasks/docker.yml
- name: Create Docker Registry
docker: image=registry name=registry state=running ports="5000:5000"
- name: Pull Docker Images
command: docker pull {{ item.name }}:{{ item.tag }}
with_items: images
- name: Tag the Images
command: docker tag {{ item.name }}:{{ item.tag }} {{registry}}{{ item.name }}:{{ item.tag }}
with_items: images
ignore_errors: yes
- name: Ship Images to Registry
command: docker push {{ registry }}{{ item.name }}:{{ item.tag }}
with_items: images