]> git.phdru.name Git - ansible.git/commitdiff
Feat(add_apache_vhost): Create directories in `/usr/local/apache22`
authorOleg Broytman <phd@phdru.name>
Thu, 25 Jul 2019 23:39:02 +0000 (02:39 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 25 Jul 2019 23:45:59 +0000 (02:45 +0300)
playbooks/debian/roles/add_apache_vhost/tasks/main.yml

index d5f9ddd72a36b4a18a2d635f82f144dc79d5d2e7..0c9567558ceeff6df9e3b3d25697655506e35260 100644 (file)
   notify: Reload apache
   when: vhost.rc != 0
 
-- name: Create log directory
+- name: Create directories
   become: true
   file:
-    path: /var/log/apache2/{{ virtual_host }}
+    path: "{{ item }}/{{ virtual_host }}"
     state: directory
     owner: root
-    group: root
-    mode: '0640'
+    group: www-data
+    mode: '0755'
+  loop: ['/usr/local/apache2/cgi-bin', '/usr/local/apache2/htdocs',
+         '/var/log/apache2',
+        ]
   when: vhost.rc != 0