--- - fail: msg: only compatible with Debian >= 8 when: - ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<') - name: Include apache role include_role: name: apache - name: Include PHP role include_role: name: php vars: php_apache_enable: True when: packweb_apache_modphp - name: Include PHP role include_role: name: php vars: php_fpm_enable: True when: packweb_apache_fpm - name: Add elements to user account template file: path: "/etc/skel/{{ item.path }}" state: "{{ item.state }}" mode: "{{ item.mode }}" with_items: - { path: log, mode: "0750", state: directory } - { path: awstats, mode: "0750", state: directory } - { path: www, mode: "0750", state: directory } - name: Copy apache empty log files if missing copy: src: "log/{{ item }}" dest: "/etc/skel/log/{{ item }}" mode: "0644" force: no with_items: - access.log - error.log - name: "Install userlogrotate (jessie)" copy: src: userlogrotate_jessie dest: /etc/cron.weekly/userlogrotate mode: "0755" when: ansible_distribution_release == "jessie" - name: "Install userlogrotate (Debian 9 or later)" copy: src: userlogrotate dest: /etc/cron.weekly/userlogrotate mode: "0755" when: ansible_distribution_major_version | version_compare('9', '>=') - name: Force DIR_MODE to 0750 in /etc/adduser.conf lineinfile: dest: /etc/adduser.conf regexp: '^DIR_MODE=' line: 'DIR_MODE=0750' - include: apache.yml - include: phpmyadmin.yml - include: awstats.yml - include: fhs_retrictions.yml when: packweb_fhs_retrictions - name: Install Evoadmin include_role: name: webapps/evoadmin-web vars: evoadmin_enable_vhost: "{{ packweb_enable_evoadmin_vhost }}"