forked from Voronenko/ansible-developer_recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks_apache.yml
153 lines (133 loc) · 3.43 KB
/
tasks_apache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
- name: Apache | install apache2
apt: name=apache2 update_cache=yes state=latest
become: yes
tags:
- setup
- apache2
- name: Apache | install libapache2-mod-proxy-html for mod_html_proxy
apt: name=libapache2-mod-proxy-html update_cache=yes state=latest
become: yes
tags:
- setup
- apache2
- name: Apache | install apache2 MPM Worker
apt: name=apache2-mpm-worker state=latest
when: "apache_mode == 'worker'"
become: yes
tags:
- setup
- apache2
- name: Apache |install libapache2-mod-wsgi
apt: name=libapache2-mod-wsgi state=latest
become: yes
tags:
- setup
- apache2
- name: Apache |install libapache2-mod-fastcgi
apt: name=libapache2-mod-fastcgi state=latest
when: "apache_mode == 'worker'"
become: yes
tags:
- setup
- apache2
- name: Apache |enabled mod_rewrite
apache2_module: name=rewrite state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_wsgi
apache2_module: name=wsgi state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_actions
apache2_module: name=actions state=present
when: "apache_mode == 'worker'"
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_xml2enc
apache2_module: name=xml2enc state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_proxy_html
apache2_module: name=proxy_html state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_proxy_http
apache2_module: name=proxy_http state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_headers
apache2_module: name=headers state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_expires
apache2_module: name=expires state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_alias
apache2_module: name=alias state=present
when: "apache_mode == 'worker'"
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_ssl
apache2_module: name=ssl state=present
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache |enabled mod_fastcgi
apache2_module: name=fastcgi state=present
when: "apache_mode == 'worker'"
become: yes
notify:
- restart apache2
tags:
- setup
- apache2
- name: Apache | deactivate default site if {{apache2_disable_default}} is set
command: a2dissite 000-default
when: apache2_disable_default is defined
become: yes
- name: Apache |restart apache2
service: name=apache2 state=restarted
become: yes
tags:
- setup
- apache2