2014-02-28 23:23:24 +01:00
|
|
|
---
|
2014-04-22 14:34:37 +02:00
|
|
|
- name: Include OS-specific variables.
|
|
|
|
include_vars: "{{ ansible_os_family }}.yml"
|
2014-02-28 23:23:24 +01:00
|
|
|
|
2014-04-22 14:34:37 +02:00
|
|
|
- include: setup-RedHat.yml
|
|
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
|
|
|
|
- include: setup-Debian.yml
|
|
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
|
|
|
|
- name: Add apache vhosts configuration.
|
|
|
|
template: >
|
|
|
|
src=vhosts.conf.j2
|
|
|
|
dest={{ apache_conf_path }}/vhosts.conf
|
|
|
|
owner=root group=root mode=644
|
2014-02-28 23:23:24 +01:00
|
|
|
notify: restart apache
|
2014-04-23 16:47:33 +02:00
|
|
|
when: apache_create_vhosts
|
2014-02-28 23:23:24 +01:00
|
|
|
|
2014-04-22 14:34:37 +02:00
|
|
|
- name: Ensure Apache is started and enabled on boot.
|
|
|
|
service: >
|
|
|
|
name={{ apache_daemon }}
|
|
|
|
state=started
|
|
|
|
enabled=yes
|