Code style cleanup.

This commit is contained in:
Jeff Geerling 2014-10-05 19:13:00 -05:00
parent d191d3a7fd
commit 034bdb7949
6 changed files with 47 additions and 45 deletions

View file

@ -1,5 +1,5 @@
--- ---
- name: restart apache - name: restart apache
service: > service:
name={{ apache_daemon }} name: "{{ apache_daemon }}"
state=restarted state: restarted

View file

@ -19,15 +19,17 @@
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- name: Add apache vhosts configuration. - name: Add apache vhosts configuration.
template: > template:
src=vhosts-{{ apache_vhosts_version }}.conf.j2 src: "vhosts-{{ apache_vhosts_version }}.conf.j2"
dest={{ apache_conf_path }}/vhosts.conf dest: "{{ apache_conf_path }}/vhosts.conf"
owner=root group=root mode=644 owner: root
group: root
mode: 0644
notify: restart apache notify: restart apache
when: apache_create_vhosts when: apache_create_vhosts
- name: Ensure Apache is started and enabled on boot. - name: Ensure Apache is started and enabled on boot.
service: > service:
name={{ apache_daemon }} name: "{{ apache_daemon }}"
state=started state: started
enabled=yes enabled: yes

View file

@ -1,32 +1,32 @@
--- ---
- name: Ensure Apache is installed. - name: Ensure Apache is installed.
apt: > apt: "name={{ item }} state=installed"
name={{ item }}
state=installed
with_items: apache_packages with_items: apache_packages
- name: Configure Apache. - name: Configure Apache.
lineinfile: > lineinfile:
dest="{{ apache_server_root }}/ports.conf" dest: "{{ apache_server_root }}/ports.conf"
regexp="{{ item.regexp }}" regexp: "{{ item.regexp }}"
line="{{ item.line }}" line: "{{ item.line }}"
state=present state: present
with_items: apache_ports_configuration_items with_items: apache_ports_configuration_items
notify: restart apache notify: restart apache
- name: Enable Apache mods. - name: Enable Apache mods.
file: > file:
src={{ apache_server_root }}/mods-available/{{ item }} src: "{{ apache_server_root }}/mods-available/{{ item }}"
dest={{ apache_server_root }}/mods-enabled/{{ item }} dest: "{{ apache_server_root }}/mods-enabled/{{ item }}"
state=link state: link
with_items: apache_mods_enabled with_items: apache_mods_enabled
notify: restart apache notify: restart apache
- name: Add apache vhosts configuration. - name: Add apache vhosts configuration.
template: > template:
src=vhosts-{{ apache_vhosts_version }}.conf.j2 src: "vhosts-{{ apache_vhosts_version }}.conf.j2"
dest={{ apache_conf_path }}/sites-available/vhosts.conf dest: "{{ apache_conf_path }}/sites-available/vhosts.conf"
owner=root group=root mode=644 owner: root
group: root
mode: 0644
notify: restart apache notify: restart apache
when: apache_create_vhosts when: apache_create_vhosts

View file

@ -1,16 +1,16 @@
--- ---
- name: Ensure Apache is installed. - name: Ensure Apache is installed.
yum: > yum:
name={{ item }} name: "{{ item }}"
state=installed state: installed
enablerepo={{ apache_enablerepo }} enablerepo: "{{ apache_enablerepo }}"
with_items: apache_packages with_items: apache_packages
- name: Configure Apache. - name: Configure Apache.
lineinfile: > lineinfile:
dest={{ apache_server_root }}/conf/{{ apache_daemon }}.conf dest: "{{ apache_server_root }}/conf/{{ apache_daemon }}.conf"
regexp="{{ item.regexp }}" regexp: "{{ item.regexp }}"
line="{{ item.line }}" line: "{{ item.line }}"
state=present state: present
with_items: apache_ports_configuration_items with_items: apache_ports_configuration_items
notify: restart apache notify: restart apache