From 09617dd35ad053761a94a2897bc6295b3e164fc1 Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Wed, 4 Mar 2020 18:05:48 +0100 Subject: [PATCH] Move postfix network config to postfix.yml file instead of base services.yml file --- roles/docker/tasks/services.yml | 8 -------- roles/docker/tasks/services/postfix.yml | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/roles/docker/tasks/services.yml b/roles/docker/tasks/services.yml index 57280699..45c9233e 100644 --- a/roles/docker/tasks/services.yml +++ b/roles/docker/tasks/services.yml @@ -3,14 +3,6 @@ docker_network: name: external_services -- name: setup network for postfix - docker_network: - name: postfix - ipam_options: - subnet: '172.16.0.0/16' - gateway: 172.16.0.1 - - - name: setup services include_tasks: "services/{{ item }}.yml" with_items: "{{ services }}" diff --git a/roles/docker/tasks/services/postfix.yml b/roles/docker/tasks/services/postfix.yml index 59d5472e..ee0896dc 100644 --- a/roles/docker/tasks/services/postfix.yml +++ b/roles/docker/tasks/services/postfix.yml @@ -1,5 +1,12 @@ --- +- name: setup network for postfix + docker_network: + name: postfix + ipam_config: + subnet: '172.16.0.0/16' + gateway: 172.16.0.1 + - name: setup postfix docker container for outgoing mail docker_container: name: postfix