Skip to content

Commit e597140

Browse files
authored
Merge pull request #2 from hellofresh/add-docker-conf
make docker conf configurable
2 parents ff946a7 + acfb745 commit e597140

File tree

4 files changed

+46
-4
lines changed

4 files changed

+46
-4
lines changed

handlers/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- name: restart docker
3+
service:
4+
name="docker"
5+
state="restarted"
6+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22

3-
- name: Ensure composer dir exists
3+
- name: Ensure docker compose dir exists
44
file:
55
path="{{ docker_compose_dir }}"
66
mode=0755
77
state="directory"
88

9-
- name: Download composer
9+
- name: Download docker compose
1010
get_url:
1111
url="{{ docker_compose_url }}"
1212
dest="{{ docker_compose_dir }}/{{ docker_compose_file }}"

tasks/main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@
1919
apt:
2020
pkg="docker-engine"
2121

22-
- name: Include composer
23-
include: composer.yml
22+
- name: Include docker-compose.yml
23+
include: docker-compose.yml
2424
when: docker_compose_install
2525

26+
- name: Include docker conf
27+
template:
28+
src=docker_conf_ubuntu_14.04.j2
29+
dest=/etc/default/docker
30+
notify:
31+
- restart docker
32+
2633
- name: Ensure docker is running and starts by default
2734
service:
2835
name="docker"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# {{ ansible_managed }}
2+
# Docker Upstart and SysVinit configuration file
3+
4+
#
5+
# THIS FILE DOES NOT APPLY TO SYSTEMD
6+
#
7+
# Please see the documentation for "systemd drop-ins":
8+
# https://docs.docker.com/engine/articles/systemd/
9+
#
10+
11+
# Customize location of Docker binary (especially for development testing).
12+
{% if dockerhost_dockererd is defined %}
13+
DOCKERD="{{ dockerhost_dockererd }}"
14+
{% endif %}
15+
16+
# Use DOCKER_OPTS to modify the daemon startup options.
17+
{% if dockerhost_docker_opts is defined %}
18+
DOCKER_OPTS="{{ dockerhost_docker_opts }}"
19+
{% endif %}
20+
21+
# If you need Docker to use an HTTP proxy, it can also be specified here.
22+
{% if dockerhost_http_proxy is defined %}
23+
export http_proxy="{{ dockerhost_http_proxy }}"
24+
{% endif %}
25+
26+
# This is also a handy place to tweak where Docker's temporary files go.
27+
{% if dockerhost_tmpdir is defined %}
28+
export TMPDIR="{{ dockerhost_tmpdir }}"
29+
{% endif %}

0 commit comments

Comments
 (0)