Skip to content

Commit 034bdb7

Browse files
committed
Code style cleanup.
1 parent d191d3a commit 034bdb7

File tree

6 files changed

+47
-45
lines changed

6 files changed

+47
-45
lines changed

handlers/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
- name: restart apache
3-
service: >
4-
name={{ apache_daemon }}
5-
state=restarted
3+
service:
4+
name: "{{ apache_daemon }}"
5+
state: restarted

tasks/main.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919
when: ansible_os_family == 'Debian'
2020

2121
- 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
2628
notify: restart apache
2729
when: apache_create_vhosts
2830

2931
- 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

tasks/setup-Debian.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
---
22
- name: Ensure Apache is installed.
3-
apt: >
4-
name={{ item }}
5-
state=installed
3+
apt: "name={{ item }} state=installed"
64
with_items: apache_packages
75

86
- 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
1412
with_items: apache_ports_configuration_items
1513
notify: restart apache
1614

1715
- 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
2220
with_items: apache_mods_enabled
2321
notify: restart apache
2422

2523
- 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
3030
notify: restart apache
3131
when: apache_create_vhosts
3232

tasks/setup-RedHat.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
- 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 }}"
77
with_items: apache_packages
88

99
- 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
1515
with_items: apache_ports_configuration_items
1616
notify: restart apache

vars/Debian-precise.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ apache_conf_path: /etc/apache2
55
apache_vhosts_version: "2.2"
66

77
__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
1313

1414
apache_ports_configuration_items:
1515
- {

vars/Debian-trusty.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ apache_conf_path: /etc/apache2
55
apache_vhosts_version: "2.4"
66

77
__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
1212

1313
apache_ports_configuration_items:
1414
- {

0 commit comments

Comments
 (0)