Skip to content

Commit

Permalink
Merge pull request #636 from Capgemini/simple-support-of-private-regi…
Browse files Browse the repository at this point in the history
…stry

Add support for docker private registry
  • Loading branch information
tayzlor committed Feb 19, 2016
2 parents d2f1163 + 6c14298 commit c2183cd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
17 changes: 17 additions & 0 deletions roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
---
# tasks file for docker
- name: ensure docker config dir exists
sudo: yes
file:
path: /root/.docker
state: directory
tags:
- docker

- name: setup private docker registry credentials
sudo: yes
when: private_docker_registry|bool
template:
src: config.json.j2
dest: /root/.docker/config.json
tags:
- docker

- name: deploy docker service
sudo: yes
sudo_user: root
Expand Down
8 changes: 8 additions & 0 deletions roles/docker/templates/config.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"auths": {
"{{ docker_registry_url }}": {
"auth": "{{ docker_registry_auth }}",
"email": "{{ docker_registry_email }}"
}
}
}
2 changes: 1 addition & 1 deletion roles/marathon/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# defaults file for marathon
marathon_consul_dir: /etc/consul.d
marathon_enabled: true
marathon_version: '0.15.1'
marathon_version: '0.15.2'
marathon_restart_policy: 'always'
marathon_net: 'host'
marathon_hostname: "{{ ansible_ssh_host }}"
Expand Down
1 change: 1 addition & 0 deletions roles/mesos/templates/mesos-slave.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ExecStart=/usr/bin/docker run --rm --name mesos_slave \
-v /sys:/sys \
-v /proc:/host/proc:ro \
-v /lib/libgcrypt.so:/lib/libgcrypt.so:ro \
-v /lib/libgcrypt.so:/lib/libgcrypt.so.20:ro \
-v /lib/libsystemd.so.0:/lib/libsystemd.so.0:ro \
-v /lib/libpthread.so.0:/lib/libpthread.so.0:ro \
-v /lib64/libdevmapper.so.1.02:/lib/libdevmapper.so.1.02:ro \
Expand Down

0 comments on commit c2183cd

Please sign in to comment.