diff --git a/packweb-apache/files/log/access.log b/packweb-apache/files/log/access.log deleted file mode 100644 index e69de29b..00000000 diff --git a/packweb-apache/files/log/error.log b/packweb-apache/files/log/error.log deleted file mode 100644 index e69de29b..00000000 diff --git a/packweb-apache/tasks/main.yml b/packweb-apache/tasks/main.yml index 0bac872e..b24c9ae6 100644 --- a/packweb-apache/tasks/main.yml +++ b/packweb-apache/tasks/main.yml @@ -27,15 +27,21 @@ - { path: awstats, mode: "0750", state: directory } - { path: www, mode: "0750", state: directory } -- name: Copy apache empty log files if missing - copy: - src: "log/{{ item }}" +- name: Apache log file (templates) are present + command: "touch /etc/skel/log/{{ item }}" + args: + creates: "/etc/skel/log/{{ item }}" + with_items: + - access.log + - error.log + +- name: Apache log file (templates) have the proper permissions + file: dest: "/etc/skel/log/{{ item }}" mode: "0644" - force: no with_items: - - access.log - - error.log + - access.log + - error.log - name: "Install userlogrotate (jessie)" copy: