Last change
on this file since 3712 was 3712, checked in by Bruno Cornec, 6 years ago |
Fix cron job for httpd restart
|
File size:
1.2 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: Setup httpd restart by cron
|
---|
30 | 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
|
---|
31 | tags: httpd
|
---|
32 |
|
---|
33 | - name: Configure Apache logrotate
|
---|
34 | copy: src=files/mondorescue.logrot dest=/etc/logrotate.d/mondorescue owner=root group=root mode=0644 backup=yes
|
---|
35 | tags: httpd
|
---|
36 |
|
---|
37 | - name: Check that Apache is running and enabled
|
---|
38 | service: name=httpd state=started enabled=yes
|
---|
39 | tags: httpd
|
---|
Note:
See
TracBrowser
for help on using the repository browser.