mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-07 06:33:30 +01:00
26 lines
623 B
YAML
26 lines
623 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
|
|
|
|
- name: Ensure Apache is started and enabled on boot.
|
|
service: >
|
|
name={{ apache_daemon }}
|
|
state=started
|
|
enabled=yes
|
|
|
|
- name: Test task that always reports a change.
|
|
command: date
|
|
changed_when: true
|