2017-07-03 18:22:24 +02:00
|
|
|
---
|
|
|
|
|
2017-09-06 15:34:11 +02:00
|
|
|
- name: "Set custom values for PHP config (jessie)"
|
2017-07-03 18:22:24 +02:00
|
|
|
ini_file:
|
2017-09-06 15:34:11 +02:00
|
|
|
dest: /etc/php5/apache2/conf.d/zzz-evolinux-custom.ini
|
2017-07-03 18:22:24 +02:00
|
|
|
section: PHP
|
|
|
|
option: "disable_functions"
|
|
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
2017-10-10 00:03:22 +02:00
|
|
|
notify: reload apache2
|
2017-07-13 14:09:24 +02:00
|
|
|
when: ansible_distribution_release == "jessie"
|
2017-07-03 18:22:24 +02:00
|
|
|
|
2019-10-02 15:45:41 +02:00
|
|
|
- name: "Set custom values for PHP config (Debian 9)"
|
2017-07-13 14:09:24 +02:00
|
|
|
ini_file:
|
2017-09-06 15:34:11 +02:00
|
|
|
dest: /etc/php/7.0/apache2/conf.d/zzz-evolinux-custom.ini
|
2017-07-13 14:09:24 +02:00
|
|
|
section: PHP
|
|
|
|
option: "disable_functions"
|
|
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
2017-10-10 00:03:22 +02:00
|
|
|
notify: reload apache2
|
2019-12-31 10:18:19 +01:00
|
|
|
when: ansible_distribution_major_version is version_compare('9', '=')
|
2019-10-02 15:45:41 +02:00
|
|
|
|
|
|
|
- name: "Set custom values for PHP config (Debian 10)"
|
|
|
|
ini_file:
|
|
|
|
dest: /etc/php/7.3/apache2/conf.d/zzz-evolinux-custom.ini
|
|
|
|
section: PHP
|
|
|
|
option: "disable_functions"
|
|
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
|
|
notify: reload apache2
|
2019-12-31 10:18:19 +01:00
|
|
|
when: ansible_distribution_major_version is version_compare('10', '=')
|
2017-07-03 18:22:24 +02:00
|
|
|
|
|
|
|
- name: Install evoadmin VHost
|
|
|
|
template:
|
2019-05-06 22:00:45 +02:00
|
|
|
src: "{{ item }}"
|
2017-07-03 18:22:24 +02:00
|
|
|
dest: /etc/apache2/sites-available/evoadmin.conf
|
2019-08-27 15:58:08 +02:00
|
|
|
force: "{{ evoadmin_force_vhost }}"
|
2019-05-06 22:00:45 +02:00
|
|
|
with_first_found:
|
2019-08-27 15:58:08 +02:00
|
|
|
- "templates/evoadmin-web/evoadmin.{{ inventory_hostname }}.conf.j2"
|
|
|
|
- "templates/evoadmin-web/evoadmin.{{ host_group }}.conf.j2"
|
|
|
|
- "templates/evoadmin-web/evoadmin.conf.j2"
|
|
|
|
- "evoadmin.conf.j2"
|
2019-05-06 22:00:45 +02:00
|
|
|
register: evoadmin_vhost_template
|
2017-07-03 18:22:24 +02:00
|
|
|
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
|
2017-07-03 18:23:39 +02:00
|
|
|
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
|
2017-07-03 18:22:24 +02:00
|
|
|
|
2019-08-30 16:32:44 +02:00
|
|
|
- name: Copy htpasswd for evoadmin
|
|
|
|
template:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "/var/www/.ansible_evoadmin_htpasswd"
|
|
|
|
mode: "0644"
|
|
|
|
owner: root
|
|
|
|
group: www-data
|
|
|
|
force: "{{ evoadmin_htpasswd_force }}"
|
|
|
|
with_first_found:
|
|
|
|
- "templates/evoadmin-web/htpasswd.{{ inventory_hostname }}.j2"
|
|
|
|
- "templates/evoadmin-web/htpasswd.{{ host_group }}.j2"
|
|
|
|
- "templates/evoadmin-web/htpasswd.j2"
|
|
|
|
- "htpasswd.j2"
|
|
|
|
register: evoadmin_htpasswd_template
|
2019-09-23 21:57:35 +02:00
|
|
|
when: evoadmin_htpasswd
|
2019-08-30 16:32:44 +02:00
|
|
|
|
2017-07-03 18:22:24 +02:00
|
|
|
- name: Copy config file for evoadmin
|
2017-07-03 18:23:39 +02:00
|
|
|
template:
|
2019-05-06 22:00:45 +02:00
|
|
|
src: "{{ item }}"
|
2019-08-27 15:58:08 +02:00
|
|
|
dest: "{{ evoadmin_document_root }}/conf/config.local.php"
|
2017-12-15 14:48:32 +01:00
|
|
|
mode: "0640"
|
2017-08-30 04:06:46 +02:00
|
|
|
owner: evoadmin
|
|
|
|
group: evoadmin
|
2019-08-27 15:58:08 +02:00
|
|
|
force: "{{ evoadmin_config_local_php_force }}"
|
2019-05-06 22:00:45 +02:00
|
|
|
with_first_found:
|
2019-08-27 15:58:08 +02:00
|
|
|
- "templates/evoadmin-web/config.local.{{ inventory_hostname }}.php.j2"
|
|
|
|
- "templates/evoadmin-web/config.local.{{ host_group }}.php.j2"
|
|
|
|
- "templates/evoadmin-web/config.local.php.j2"
|
2019-09-23 21:57:35 +02:00
|
|
|
- "config.local.php.j2"
|
2019-08-27 15:58:08 +02:00
|
|
|
register: evoadmin_config_local_php_template
|
2019-06-19 18:00:19 +02:00
|
|
|
|
|
|
|
- name: Enable proxy_fcgi
|
|
|
|
apache2_module:
|
|
|
|
state: present
|
|
|
|
name: proxy_fcgi
|
|
|
|
notify: restart apache2
|
2019-08-27 16:23:04 +02:00
|
|
|
when: evoadmin_multi_php
|