|
|
@ -1,26 +1,19 @@ |
|
|
|
--- |
|
|
|
- include: service.yaml |
|
|
|
# static: yes # see static include issue: https://github.com/ansible/ansible/issues/13485 |
|
|
|
vars: |
|
|
|
service_name: apache2 |
|
|
|
service_packages: |
|
|
|
- apache2 |
|
|
|
|
|
|
|
- name: enable apache2 configuration |
|
|
|
file: |
|
|
|
src: "/etc/apache2/sites-available/{{ config_name }}" |
|
|
|
dest: "/etc/apache2/sites-enabled/{{ config_name }}" |
|
|
|
state: link |
|
|
|
notify: restart apache2 |
|
|
|
|
|
|
|
- name: disable apache2 default configuration |
|
|
|
file: path=/etc/apache2/sites-enabled/000-default.conf state=absent |
|
|
|
notify: restart apache2 |
|
|
|
|
|
|
|
- name: upload apache proxy configuration |
|
|
|
- name: install apache2 libapache2-mod-php5 |
|
|
|
apt: name="{{ item }}" state=present |
|
|
|
with_items: |
|
|
|
- libapache2-mod-php5 |
|
|
|
when: php | bool |
|
|
|
notify: |
|
|
|
- enable apache2 configuration |
|
|
|
- restart apache2 |