From 534785f75296641b4c1e3441da3a81603c4a7f40 Mon Sep 17 00:00:00 2001 From: Ivan Grynenko Date: Wed, 6 Jul 2016 21:01:15 +1000 Subject: [PATCH] Customising --- tasks/vhosts.yml | 4 ++++ templates/vhosts.j2 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/vhosts.yml b/tasks/vhosts.yml index 6af3173..8e7ff76 100755 --- a/tasks/vhosts.yml +++ b/tasks/vhosts.yml @@ -1,4 +1,8 @@ --- +- name: Creates Nginx conf directories + file: path={{ nginx_vhost_path }} state=directory mode=0755 recurse=yes + when: nginx_vhosts|length > 0 + - name: Remove default nginx vhost config file (if configured). file: path: "{{ nginx_default_vhost_path }}" diff --git a/templates/vhosts.j2 b/templates/vhosts.j2 index 20bcf6f..04dbf9e 100755 --- a/templates/vhosts.j2 +++ b/templates/vhosts.j2 @@ -1,6 +1,6 @@ {% for vhost in nginx_vhosts %} server { - listen {{ vhost.listen | default('80') }}; + listen {{ vhost.listen | default('80 default_server') }}; {% if vhost.server_name is defined %} server_name {{ vhost.server_name }};