mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-09 15:33:30 +01:00
Code style cleanup.
This commit is contained in:
parent
d191d3a7fd
commit
034bdb7949
6 changed files with 47 additions and 45 deletions
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: restart apache
|
||||
service: >
|
||||
name={{ apache_daemon }}
|
||||
state=restarted
|
||||
service:
|
||||
name: "{{ apache_daemon }}"
|
||||
state: restarted
|
||||
|
|
|
@ -19,15 +19,17 @@
|
|||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Add apache vhosts configuration.
|
||||
template: >
|
||||
src=vhosts-{{ apache_vhosts_version }}.conf.j2
|
||||
dest={{ apache_conf_path }}/vhosts.conf
|
||||
owner=root group=root mode=644
|
||||
template:
|
||||
src: "vhosts-{{ apache_vhosts_version }}.conf.j2"
|
||||
dest: "{{ apache_conf_path }}/vhosts.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart apache
|
||||
when: apache_create_vhosts
|
||||
|
||||
- name: Ensure Apache is started and enabled on boot.
|
||||
service: >
|
||||
name={{ apache_daemon }}
|
||||
state=started
|
||||
enabled=yes
|
||||
service:
|
||||
name: "{{ apache_daemon }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
---
|
||||
- name: Ensure Apache is installed.
|
||||
apt: >
|
||||
name={{ item }}
|
||||
state=installed
|
||||
apt: "name={{ item }} state=installed"
|
||||
with_items: apache_packages
|
||||
|
||||
- name: Configure Apache.
|
||||
lineinfile: >
|
||||
dest="{{ apache_server_root }}/ports.conf"
|
||||
regexp="{{ item.regexp }}"
|
||||
line="{{ item.line }}"
|
||||
state=present
|
||||
lineinfile:
|
||||
dest: "{{ apache_server_root }}/ports.conf"
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
state: present
|
||||
with_items: apache_ports_configuration_items
|
||||
notify: restart apache
|
||||
|
||||
- name: Enable Apache mods.
|
||||
file: >
|
||||
src={{ apache_server_root }}/mods-available/{{ item }}
|
||||
dest={{ apache_server_root }}/mods-enabled/{{ item }}
|
||||
state=link
|
||||
file:
|
||||
src: "{{ apache_server_root }}/mods-available/{{ item }}"
|
||||
dest: "{{ apache_server_root }}/mods-enabled/{{ item }}"
|
||||
state: link
|
||||
with_items: apache_mods_enabled
|
||||
notify: restart apache
|
||||
|
||||
- name: Add apache vhosts configuration.
|
||||
template: >
|
||||
src=vhosts-{{ apache_vhosts_version }}.conf.j2
|
||||
dest={{ apache_conf_path }}/sites-available/vhosts.conf
|
||||
owner=root group=root mode=644
|
||||
template:
|
||||
src: "vhosts-{{ apache_vhosts_version }}.conf.j2"
|
||||
dest: "{{ apache_conf_path }}/sites-available/vhosts.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart apache
|
||||
when: apache_create_vhosts
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
- name: Ensure Apache is installed.
|
||||
yum: >
|
||||
name={{ item }}
|
||||
state=installed
|
||||
enablerepo={{ apache_enablerepo }}
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
enablerepo: "{{ apache_enablerepo }}"
|
||||
with_items: apache_packages
|
||||
|
||||
- name: Configure Apache.
|
||||
lineinfile: >
|
||||
dest={{ apache_server_root }}/conf/{{ apache_daemon }}.conf
|
||||
regexp="{{ item.regexp }}"
|
||||
line="{{ item.line }}"
|
||||
state=present
|
||||
lineinfile:
|
||||
dest: "{{ apache_server_root }}/conf/{{ apache_daemon }}.conf"
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
state: present
|
||||
with_items: apache_ports_configuration_items
|
||||
notify: restart apache
|
||||
|
|
|
@ -5,11 +5,11 @@ apache_conf_path: /etc/apache2
|
|||
apache_vhosts_version: "2.2"
|
||||
|
||||
__apache_packages:
|
||||
- apache2
|
||||
- apache2-mpm-prefork
|
||||
- apache2-utils
|
||||
- apache2.2-bin
|
||||
- apache2.2-common
|
||||
- apache2
|
||||
- apache2-mpm-prefork
|
||||
- apache2-utils
|
||||
- apache2.2-bin
|
||||
- apache2.2-common
|
||||
|
||||
apache_ports_configuration_items:
|
||||
- {
|
||||
|
|
|
@ -5,10 +5,10 @@ apache_conf_path: /etc/apache2
|
|||
apache_vhosts_version: "2.4"
|
||||
|
||||
__apache_packages:
|
||||
- apache2
|
||||
- apache2-mpm-prefork
|
||||
- apache2-utils
|
||||
- apache2-bin
|
||||
- apache2
|
||||
- apache2-mpm-prefork
|
||||
- apache2-utils
|
||||
- apache2-bin
|
||||
|
||||
apache_ports_configuration_items:
|
||||
- {
|
||||
|
|
Loading…
Reference in a new issue