From 23f92af92065be351bdf443eacb3a551cc8d4caa Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Sat, 24 Sep 2016 10:35:18 -0500 Subject: [PATCH] Tweak syntax and docs for vhosts config. --- tasks/vhosts.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tasks/vhosts.yml b/tasks/vhosts.yml index 70b37d0..aca9315 100644 --- a/tasks/vhosts.yml +++ b/tasks/vhosts.yml @@ -4,15 +4,13 @@ path: "{{ nginx_default_vhost_path }}" state: absent when: nginx_remove_default_vhost - notify: - - reload nginx + notify: reload nginx -- name: Create nginx_vhost_path directory. +- name: Ensure nginx_vhost_path exists. file: path: "{{ nginx_vhost_path }}" state: directory - notify: - - reload nginx + notify: reload nginx - name: Add managed vhost config file (if any vhosts are configured). template: @@ -20,13 +18,11 @@ dest: "{{ nginx_vhost_path }}/{{ nginx_vhosts_filename }}" mode: 0644 when: nginx_vhosts|length > 0 - notify: - - reload nginx + notify: reload nginx - name: Remove managed vhost config file (if no vhosts are configured). file: path: "{{ nginx_vhost_path }}/{{ nginx_vhosts_filename }}" state: absent when: nginx_vhosts|length == 0 - notify: - - reload nginx + notify: reload nginx