mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-05 05:33:31 +01:00
23 lines
566 B
YAML
23 lines
566 B
YAML
---
|
|
- name: Include OS-specific variables.
|
|
include_vars: "{{ ansible_os_family }}.yml"
|
|
|
|
- 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
|
|
notify: restart apache
|
|
when: apache_create_vhosts
|
|
|
|
- name: Ensure Apache is started and enabled on boot.
|
|
service: >
|
|
name={{ apache_daemon }}
|
|
state=started
|
|
enabled=yes
|