From bfe4a315f9f7c10ba6194abe02bcda9684760392 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Thu, 5 Nov 2015 15:38:18 +0100 Subject: [PATCH] Vhost dir --- tasks/vhost.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/vhost.yml b/tasks/vhost.yml index 178294b..46188a4 100644 --- a/tasks/vhost.yml +++ b/tasks/vhost.yml @@ -6,6 +6,16 @@ state=directory - name: FILE | Create root folders (foreach nginx_vhosts) + file: > + path={{ nginx_root }}/{{ item.name if item.name is string else item.name[0] }} + state=directory + owner={{ item.owner | default('www-data') }} + group={{ item.group | default('www-data') }} + mode={{ item.mode | default('0755') }} + with_items: nginx_vhosts + when: item.root is not defined and item.template != '_proxy' + +- name: FILE | Create root public folders (foreach nginx_vhosts) file: > path={{ nginx_root }}/{{ item.name if item.name is string else item.name[0] }}/public state=directory