File tree Expand file tree Collapse file tree 6 files changed +47
-45
lines changed Expand file tree Collapse file tree 6 files changed +47
-45
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
- name : restart apache
3
- service : >
4
- name= {{ apache_daemon }}
5
- state= restarted
3
+ service :
4
+ name : " {{ apache_daemon }}"
5
+ state : restarted
Original file line number Diff line number Diff line change 19
19
when : ansible_os_family == 'Debian'
20
20
21
21
- name : Add apache vhosts configuration.
22
- template : >
23
- src=vhosts-{{ apache_vhosts_version }}.conf.j2
24
- dest={{ apache_conf_path }}/vhosts.conf
25
- owner=root group=root mode=644
22
+ template :
23
+ src : " vhosts-{{ apache_vhosts_version }}.conf.j2"
24
+ dest : " {{ apache_conf_path }}/vhosts.conf"
25
+ owner : root
26
+ group : root
27
+ mode : 0644
26
28
notify : restart apache
27
29
when : apache_create_vhosts
28
30
29
31
- name : Ensure Apache is started and enabled on boot.
30
- service : >
31
- name= {{ apache_daemon }}
32
- state= started
33
- enabled= yes
32
+ service :
33
+ name : " {{ apache_daemon }}"
34
+ state : started
35
+ enabled : yes
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Ensure Apache is installed.
3
- apt : >
4
- name={{ item }}
5
- state=installed
3
+ apt : " name={{ item }} state=installed"
6
4
with_items : apache_packages
7
5
8
6
- name : Configure Apache.
9
- lineinfile : >
10
- dest= "{{ apache_server_root }}/ports.conf"
11
- regexp= "{{ item.regexp }}"
12
- line= "{{ item.line }}"
13
- state= present
7
+ lineinfile :
8
+ dest : " {{ apache_server_root }}/ports.conf"
9
+ regexp : " {{ item.regexp }}"
10
+ line : " {{ item.line }}"
11
+ state : present
14
12
with_items : apache_ports_configuration_items
15
13
notify : restart apache
16
14
17
15
- name : Enable Apache mods.
18
- file : >
19
- src= {{ apache_server_root }}/mods-available/{{ item }}
20
- dest= {{ apache_server_root }}/mods-enabled/{{ item }}
21
- state= link
16
+ file :
17
+ src : " {{ apache_server_root }}/mods-available/{{ item }}"
18
+ dest : " {{ apache_server_root }}/mods-enabled/{{ item }}"
19
+ state : link
22
20
with_items : apache_mods_enabled
23
21
notify : restart apache
24
22
25
23
- name : Add apache vhosts configuration.
26
- template : >
27
- src=vhosts-{{ apache_vhosts_version }}.conf.j2
28
- dest={{ apache_conf_path }}/sites-available/vhosts.conf
29
- owner=root group=root mode=644
24
+ template :
25
+ src : " vhosts-{{ apache_vhosts_version }}.conf.j2"
26
+ dest : " {{ apache_conf_path }}/sites-available/vhosts.conf"
27
+ owner : root
28
+ group : root
29
+ mode : 0644
30
30
notify : restart apache
31
31
when : apache_create_vhosts
32
32
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Ensure Apache is installed.
3
- yum : >
4
- name= {{ item }}
5
- state= installed
6
- enablerepo= {{ apache_enablerepo }}
3
+ yum :
4
+ name : " {{ item }}"
5
+ state : installed
6
+ enablerepo : " {{ apache_enablerepo }}"
7
7
with_items : apache_packages
8
8
9
9
- name : Configure Apache.
10
- lineinfile : >
11
- dest= {{ apache_server_root }}/conf/{{ apache_daemon }}.conf
12
- regexp= "{{ item.regexp }}"
13
- line= "{{ item.line }}"
14
- state= present
10
+ lineinfile :
11
+ dest : " {{ apache_server_root }}/conf/{{ apache_daemon }}.conf"
12
+ regexp : " {{ item.regexp }}"
13
+ line : " {{ item.line }}"
14
+ state : present
15
15
with_items : apache_ports_configuration_items
16
16
notify : restart apache
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ apache_conf_path: /etc/apache2
5
5
apache_vhosts_version : " 2.2"
6
6
7
7
__apache_packages :
8
- - apache2
9
- - apache2-mpm-prefork
10
- - apache2-utils
11
- - apache2.2-bin
12
- - apache2.2-common
8
+ - apache2
9
+ - apache2-mpm-prefork
10
+ - apache2-utils
11
+ - apache2.2-bin
12
+ - apache2.2-common
13
13
14
14
apache_ports_configuration_items :
15
15
- {
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ apache_conf_path: /etc/apache2
5
5
apache_vhosts_version : " 2.4"
6
6
7
7
__apache_packages :
8
- - apache2
9
- - apache2-mpm-prefork
10
- - apache2-utils
11
- - apache2-bin
8
+ - apache2
9
+ - apache2-mpm-prefork
10
+ - apache2-utils
11
+ - apache2-bin
12
12
13
13
apache_ports_configuration_items :
14
14
- {
You can’t perform that action at this time.
0 commit comments