From: Oleg Broytman Date: Thu, 25 Jul 2019 23:39:02 +0000 (+0300) Subject: Feat(add_apache_vhost): Create directories in `/usr/local/apache22` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=abc22b217f6839eed28281b95b25e035e3b99579;p=ansible.git Feat(add_apache_vhost): Create directories in `/usr/local/apache22` --- diff --git a/playbooks/debian/roles/add_apache_vhost/tasks/main.yml b/playbooks/debian/roles/add_apache_vhost/tasks/main.yml index d5f9ddd..0c95675 100644 --- a/playbooks/debian/roles/add_apache_vhost/tasks/main.yml +++ b/playbooks/debian/roles/add_apache_vhost/tasks/main.yml @@ -22,12 +22,15 @@ 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