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

Last change on this file since 3707 was 3707, checked in by bruno, 12 months ago

Update pbtest to latest version with SLES support

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=sunday user=root job="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.