2017-03-21 17:35:42 +01:00
|
|
|
---
|
2017-03-29 17:45:57 +02:00
|
|
|
|
2017-08-23 03:30:38 +02:00
|
|
|
- fail:
|
|
|
|
msg: only compatible with Debian >= 8
|
|
|
|
when:
|
2020-02-25 10:45:35 +01:00
|
|
|
- ansible_distribution != "Debian" or ansible_distribution_major_version is version('8', '<')
|
2017-08-23 03:30:38 +02:00
|
|
|
|
2020-06-04 11:34:26 +02:00
|
|
|
- name: Additional packages are installed
|
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- zip
|
|
|
|
- unzip
|
|
|
|
state: present
|
|
|
|
|
2017-09-07 23:16:41 +02:00
|
|
|
- name: install info.php
|
|
|
|
copy:
|
|
|
|
src: info.php
|
|
|
|
dest: /var/www/info.php
|
|
|
|
mode: "0644"
|
|
|
|
|
|
|
|
- name: enable info.php link in default site index
|
|
|
|
lineinfile:
|
|
|
|
dest: /var/www/index.html
|
|
|
|
line: ' <li><a href="/info.php">Infos PHP</a></li>'
|
|
|
|
regexp: "Infos PHP"
|
|
|
|
|
2019-08-21 15:23:43 +02:00
|
|
|
- name: install opcache.php
|
|
|
|
copy:
|
|
|
|
src: opcache.php
|
|
|
|
dest: /var/www/opcache.php
|
|
|
|
mode: "0644"
|
|
|
|
|
|
|
|
- name: enable opcache.php link in default site index
|
|
|
|
lineinfile:
|
|
|
|
dest: /var/www/index.html
|
|
|
|
line: ' <li><a href="/opcache.php">Infos OpCache PHP</a></li>'
|
|
|
|
regexp: "Infos OpCache PHP"
|
|
|
|
|
2017-03-21 18:21:30 +01:00
|
|
|
- name: Add elements to user account template
|
2017-03-21 17:35:42 +01:00
|
|
|
file:
|
|
|
|
path: "/etc/skel/{{ item.path }}"
|
|
|
|
state: "{{ item.state }}"
|
|
|
|
mode: "{{ item.mode }}"
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2019-01-01 20:04:56 +01:00
|
|
|
- { path: log, mode: "0750", state: directory }
|
|
|
|
- { path: awstats, mode: "0750", state: directory }
|
|
|
|
- { path: www, mode: "0750", state: directory }
|
2017-07-03 18:22:24 +02:00
|
|
|
|
2018-04-22 17:23:31 +02:00
|
|
|
- name: Apache log file (templates) are present
|
|
|
|
command: "touch /etc/skel/log/{{ item }}"
|
|
|
|
args:
|
|
|
|
creates: "/etc/skel/log/{{ item }}"
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2018-04-22 17:23:31 +02:00
|
|
|
- access.log
|
|
|
|
- error.log
|
|
|
|
|
|
|
|
- name: Apache log file (templates) have the proper permissions
|
|
|
|
file:
|
2017-07-03 18:22:24 +02:00
|
|
|
dest: "/etc/skel/log/{{ item }}"
|
|
|
|
mode: "0644"
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2018-04-22 17:23:31 +02:00
|
|
|
- access.log
|
|
|
|
- error.log
|
2017-07-03 18:22:24 +02:00
|
|
|
|
2017-08-23 03:30:38 +02:00
|
|
|
- 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)"
|
2017-07-03 18:22:24 +02:00
|
|
|
copy:
|
|
|
|
src: userlogrotate
|
|
|
|
dest: /etc/cron.weekly/userlogrotate
|
|
|
|
mode: "0755"
|
2020-02-25 10:45:35 +01:00
|
|
|
when: ansible_distribution_major_version is version('9', '>=')
|
2017-03-21 17:35:42 +01:00
|
|
|
|
2017-03-21 18:21:30 +01:00
|
|
|
- name: Force DIR_MODE to 0750 in /etc/adduser.conf
|
2017-03-21 17:35:42 +01:00
|
|
|
lineinfile:
|
|
|
|
dest: /etc/adduser.conf
|
|
|
|
regexp: '^DIR_MODE='
|
|
|
|
line: 'DIR_MODE=0750'
|
|
|
|
|
2017-07-03 18:23:39 +02:00
|
|
|
- include: apache.yml
|
2017-03-21 17:35:42 +01:00
|
|
|
|
2017-07-03 18:23:39 +02:00
|
|
|
- include: phpmyadmin.yml
|
2017-07-03 18:22:24 +02:00
|
|
|
|
2017-07-03 18:23:39 +02:00
|
|
|
- include: awstats.yml
|
2017-03-29 17:45:57 +02:00
|
|
|
|
2017-08-23 03:23:16 +02:00
|
|
|
- include: fhs_retrictions.yml
|
2021-05-09 23:06:42 +02:00
|
|
|
when: packweb_fhs_retrictions | bool
|
2018-11-09 18:56:55 +01:00
|
|
|
|
|
|
|
- name: Periodically cache ftp directory sizes for ftpadmin.sh
|
|
|
|
cron:
|
|
|
|
name: "ProFTPd directory size caching"
|
|
|
|
special_time: daily
|
|
|
|
job: "/usr/share/scripts/evoadmin/stats.sh"
|
2020-04-08 17:54:16 +02:00
|
|
|
|
|
|
|
- include: multiphp.yml
|
|
|
|
when: packweb_multiphp_versions | length > 0
|