ansible-role-apache/tasks/main.yml

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