-
Notifications
You must be signed in to change notification settings - Fork 26
/
apache.yml
38 lines (33 loc) · 1.07 KB
/
apache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- name: load distribution-specific variables
include_vars:
file: "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_release }}.yml"
- name: enable apache2 modules
command:
cmd: "a2enmod {{ item }}"
creates: "/etc/apache2/mods-enabled/{{ item }}.load"
notify: restart apache
with_items:
- ssl
- rewrite
- name: copy php-fpm configuration
template:
src: etc_php_PHPVERSION_fpm_pool.d_shaarli.conf.j2
dest: /etc/php/{{ shaarli_php_fpm_version }}/fpm/pool.d/shaarli.conf
mode: "0644"
notify: restart php-fpm (shaarli)
- name: copy apache2 virtualhost configuration
template:
src: etc_apache2_sites-available_shaarli.conf.j2
dest: /etc/apache2/sites-available/shaarli.conf
mode: "0644"
notify: reload apache
- name: enable apache2 virtualhost
command:
cmd: a2ensite shaarli
creates: "/etc/apache2/sites-enabled/shaarli.conf"
notify: reload apache
- name: add shaarli instance domain name to hosts file
lineinfile:
path: /etc/hosts
state: present
line: "127.0.0.1 {{ shaarli_fqdn }}" # noqa no-tabs