forked from evolix/ansible-roles
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
---
|
|
|
|
- name: "Set custom values for PHP config (jessie)"
|
|
ini_file:
|
|
dest: /etc/php5/apache2/conf.d/zzz-evolinux-custom.ini
|
|
section: PHP
|
|
option: "disable_functions"
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
notify: reload apache2
|
|
when: ansible_distribution_release == "jessie"
|
|
|
|
- name: "Set custom values for PHP config (Debian 9 or later)"
|
|
ini_file:
|
|
dest: /etc/php/7.0/apache2/conf.d/zzz-evolinux-custom.ini
|
|
section: PHP
|
|
option: "disable_functions"
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
notify: reload apache2
|
|
when: ansible_distribution_major_version | version_compare('9', '>=')
|
|
|
|
- name: Install evoadmin VHost
|
|
template:
|
|
src: evoadmin.conf.j2
|
|
dest: /etc/apache2/sites-available/evoadmin.conf
|
|
notify: reload apache2
|
|
|
|
- name: Enable evoadmin vhost
|
|
command: "a2ensite evoadmin.conf"
|
|
register: cmd_a2ensite
|
|
changed_when: "'Enabling site' in cmd_a2ensite.stdout"
|
|
notify: reload apache2
|
|
when: evoadmin_enable_vhost
|
|
|
|
- name: Disable evoadmin vhost
|
|
command: "a2dissite evoadmin.conf"
|
|
register: cmd_a2dissite
|
|
changed_when: "'Disabling site' in cmd_a2dissite.stdout"
|
|
notify: reload apache2
|
|
when: not evoadmin_enable_vhost
|
|
|
|
- name: Copy config file for evoadmin
|
|
template:
|
|
src: config.local.php.j2
|
|
dest: "{{ evoadmin_document_root}}/conf/config.local.php"
|
|
mode: "0640"
|
|
owner: evoadmin
|
|
group: evoadmin
|
|
force: no
|