Page MenuHomeDevCentral

D2857.id7284.diff
No OneTemporary

D2857.id7284.diff

diff --git a/roles/paas-docker/containers/exim.sls b/roles/paas-docker/containers/exim.sls
--- a/roles/paas-docker/containers/exim.sls
+++ b/roles/paas-docker/containers/exim.sls
@@ -10,25 +10,29 @@
{% set containers = pillar['docker_containers'][grains['id']] %}
{% for instance, container in containers['exim'].items() %}
-{% set image = salt['paas_docker.get_image']("tianon/exim4", container) %}
# -------------------------------------------------------------
# Data directory
-#
-# Only required if you provide some hostname to the SMTP server
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% if 'mailname' in container %}
-
/srv/exim/{{ instance }}:
file.directory:
- user: 999
- group: 999
- makedirs: True
+{% for subdir in ['spool', 'log'] %}
+/srv/exim/{{ instance }}/{{ subdir }}:
+ file.directory:
+ - user: 999
+ - group: 999
+{% endfor %}
+
+{% if 'mailname' in container %}
/srv/exim/{{ instance }}/mailname:
file.managed:
- contents: {{ container['mailname'] }}
+{% endif %}
{% if has_selinux %}
@@ -43,8 +47,6 @@
{% endif %}
-{% endif %}
-
# -------------------------------------------------------------
# Container
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -53,13 +55,16 @@
docker_container.running:
- detach: True
- interactive: True
- - image: {{ image }}
-
+ - image: tianon/exim4
+ - binds:
+{% if 'mailname' in container %}
+ - /srv/exim/{{ instance }}/mailname:/etc/mailname:ro
+{% endif %}
+ - /srv/exim/{{ instance }}/spool:/var/spool/exim4
+ - /srv/exim/{{ instance }}/log:/var/log/exim4
{% if 'host' in container %}
- - binds: /srv/exim/{{ instance }}/mailname:/etc/mailname:ro
- hostname: {{ container['mailname'] }}
{% endif %}
-
{% if 'network' in container %}
- networks:
- {{ container['network'] }}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 23:37 (16 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2251480
Default Alt Text
D2857.id7284.diff (1 KB)

Event Timeline