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:
|
2019-01-01 20:04:56 +01:00
|
|
|
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<')
|
2017-08-23 03:30:38 +02:00
|
|
|
|
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"
|
|
|
|
|
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 }}"
|
|
|
|
with_items:
|
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 }}"
|
|
|
|
with_items:
|
|
|
|
- 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"
|
|
|
|
with_items:
|
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"
|
2019-06-18 17:35:28 +02:00
|
|
|
when: ansible_lsb.codename == "jessie"
|
2017-08-23 03:30:38 +02:00
|
|
|
|
|
|
|
- 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"
|
2017-08-23 03:30:38 +02:00
|
|
|
when: ansible_distribution_major_version | version_compare('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
|
|
|
|
when: packweb_fhs_retrictions
|
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"
|