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
|
2022-11-06 15:20:31 +01:00
|
|
|
when: ansible_distribution_release == "stretch"
|
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
|
2022-11-06 15:20:31 +01:00
|
|
|
when: ansible_distribution_release == "buster"
|
2017-07-03 18:22:24 +02:00
|
|
|
|
2021-08-17 16:38:02 +02:00
|
|
|
- name: "Set custom values for PHP config (Debian 11)"
|
|
|
|
ini_file:
|
|
|
|
dest: /etc/php/7.4/apache2/conf.d/zzz-evolinux-custom.ini
|
|
|
|
section: PHP
|
|
|
|
option: "disable_functions"
|
|
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
|
|
notify: reload apache2
|
2022-11-06 15:20:31 +01:00
|
|
|
when: ansible_distribution_release == "bullseye"
|
|
|
|
|
|
|
|
- name: "Set custom values for PHP config (Debian 11)"
|
|
|
|
ini_file:
|
|
|
|
dest: /etc/php/8.1/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 == "bookworm"
|
2021-08-17 16:38:02 +02:00
|
|
|
|
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 }}"
|
2021-05-04 13:39:47 +02:00
|
|
|
loop: "{{ query('first_found', templates) }}"
|
|
|
|
vars:
|
|
|
|
templates:
|
|
|
|
- "templates/evoadmin-web/evoadmin.{{ inventory_hostname }}.conf.j2"
|
2021-05-19 14:35:08 +02:00
|
|
|
- "templates/evoadmin-web/evoadmin.{{ host_group | default('all') }}.conf.j2"
|
2021-05-04 13:39:47 +02:00
|
|
|
- "templates/evoadmin-web/evoadmin.conf.j2"
|
|
|
|
- "templates/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
|
2021-05-09 23:06:42 +02:00
|
|
|
when: evoadmin_enable_vhost | bool
|
2017-07-03 18:23:39 +02:00
|
|
|
|
|
|
|
- name: Disable evoadmin vhost
|
|
|
|
command: "a2dissite evoadmin.conf"
|
|
|
|
register: cmd_a2dissite
|
|
|
|
changed_when: "'Disabling site' in cmd_a2dissite.stdout"
|
|
|
|
notify: reload apache2
|
2021-05-09 23:06:42 +02:00
|
|
|
when: not (evoadmin_enable_vhost | bool)
|
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 }}"
|
2021-05-04 13:39:47 +02:00
|
|
|
loop: "{{ query('first_found', templates) }}"
|
|
|
|
vars:
|
|
|
|
templates:
|
|
|
|
- "templates/evoadmin-web/htpasswd.{{ inventory_hostname }}.j2"
|
2021-05-19 14:35:08 +02:00
|
|
|
- "templates/evoadmin-web/htpasswd.{{ host_group | default('all') }}.j2"
|
2021-05-04 13:39:47 +02:00
|
|
|
- "templates/evoadmin-web/htpasswd.j2"
|
|
|
|
- "templates/htpasswd.j2"
|
2019-08-30 16:32:44 +02:00
|
|
|
register: evoadmin_htpasswd_template
|
2021-05-09 23:06:42 +02:00
|
|
|
when: evoadmin_htpasswd | bool
|
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 }}"
|
2021-05-04 13:39:47 +02:00
|
|
|
loop: "{{ query('first_found', templates) }}"
|
|
|
|
vars:
|
|
|
|
templates:
|
|
|
|
- "templates/evoadmin-web/config.local.{{ inventory_hostname }}.php.j2"
|
2021-05-19 14:35:08 +02:00
|
|
|
- "templates/evoadmin-web/config.local.{{ host_group | default('all') }}.php.j2"
|
2021-05-04 13:39:47 +02:00
|
|
|
- "templates/evoadmin-web/config.local.php.j2"
|
|
|
|
- "templates/config.local.php.j2"
|
2019-08-27 15:58:08 +02:00
|
|
|
register: evoadmin_config_local_php_template
|