source: MondoRescue/branches/3.3/ansible/roles/httpd/tasks/main.yml@ 3716

Last change on this file since 3716 was 3716, checked in by Bruno Cornec, 5 years ago

Ensure we have enough upload size for logs (2MB)

File size: 1.5 KB
Line 
1---
2
3- name: Check that Apache is installed
4 urpmi: name=apache state=installed no-recommends=yes
5 tags: httpd
6
7- name: Configure Apache log directories
8 file: path=/var/log/httpd/{{ item }} state=directory owner=apache group=apache mode=0755
9 with_items:
10 - www.mondorescue.org
11 - www.mondorescue.com
12 - www1.mondorescue.org
13 - oldwww.mondorescue.org
14 - mondorescue.hpintelco.org
15 - www.project-builder.org
16 - www1.project-builder.org
17 - pusk.project-builder.org
18 - uuwl.project-builder.org
19 - www.dploy.org
20 - www1.dploy.org
21
22- name: Configure Apache
23 template: src={{ item }} dest=/etc/httpd/conf/vhosts.d/{{ item | basename }} owner=root group=root mode=0644 backup=yes
24 with_fileglob: [ 'templates/*.conf' ]
25 notify:
26 - restart httpd
27 tags: httpd
28
29- name: Configure Apache upload max
30 lineinfile: path=/etc/httpd/conf/conf.d/fcgid.conf regexp='^[ ]*FcgidMaxRequestLen ' insertafter='[ ]*^#FcgidMaxRequestLen ' line=' FcgidMaxRequestLen 2000000'
31 notify:
32 - restart httpd
33 tags: httpd
34
35- name: Setup httpd restart by cron
36 cron: name=httpd-restart minute=43 hour=23 weekday=0 user=root job="/usr/bin/systemctl restart httpd" cron_file=httpd-restart state=present backup=yes
37 tags: httpd
38
39- name: Configure Apache logrotate
40 copy: src=files/mondorescue.logrot dest=/etc/logrotate.d/mondorescue owner=root group=root mode=0644 backup=yes
41 tags: httpd
42
43- name: Check that Apache is running and enabled
44 service: name=httpd state=started enabled=yes
45 tags: httpd
Note: See TracBrowser for help on using the repository browser.