writefreely/tasks/main.yaml
changeset 51 19fa7aa47bf1
parent 27 8fddefdd948b
--- a/writefreely/tasks/main.yaml	Sun Jun 28 08:59:54 2020 -0500
+++ b/writefreely/tasks/main.yaml	Sun Jun 28 09:00:01 2020 -0500
@@ -25,25 +25,18 @@
     mode: "0755"
   notify: migrate db
 
-- name: create root dir
+- name: create instance dir
   become: yes
   file:
-    path: "{{writefreely_dir}}"
+    path: "{{item}}"
     state: "directory"
     owner: "{{writefreely_user}}"
     group: "{{writefreely_user}}"
     mode: "0755"
   notify: reload service
-
-- name: create instance dir
-  become: yes
-  file:
-    path: "{{writefreely_dir}}/{{writefreely_instance}}"
-    state: "directory"
-    owner: "{{writefreely_user}}"
-    group: "{{writefreely_user}}"
-    mode: "0755"
-  notify: reload service
+  loop:
+    - "{{writefreely_dir}}"
+    - "{{writefreely_dir}}/{{writefreely_instance}}"
 
 - name: install static content
   become: yes