forked from evolix/ansible-roles
packweb: split jessie/stretch
This commit is contained in:
parent
927dbfa889
commit
9dbed2dd59
|
@ -16,14 +16,24 @@
|
||||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
when: envvar_grep_path.rc != 0
|
when: envvar_grep_path.rc != 0
|
||||||
|
|
||||||
|
- name: Install ITK module for Jessie
|
||||||
|
apt:
|
||||||
|
name: apache2-mpm-itk
|
||||||
|
when: ansible_distribution_release == "jessie"
|
||||||
|
|
||||||
|
- name: Install ITK module for Stretch
|
||||||
|
apt:
|
||||||
|
name: libapache2-mpm-itk
|
||||||
|
when: ansible_distribution_release == "stretch"
|
||||||
|
|
||||||
- name: Additional packages are installed
|
- name: Additional packages are installed
|
||||||
apt:
|
apt:
|
||||||
name: '{{ item }}'
|
name: '{{ item }}'
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- apache2-mpm-itk
|
|
||||||
- libapache2-mod-evasive
|
- libapache2-mod-evasive
|
||||||
- libapache2-mod-security2
|
- libapache2-mod-security2
|
||||||
|
- modsecurity-crs
|
||||||
|
|
||||||
- name: Copy Apache settings for modules
|
- name: Copy Apache settings for modules
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -38,7 +38,11 @@
|
||||||
|
|
||||||
- include: apache.yml
|
- include: apache.yml
|
||||||
|
|
||||||
|
- include: php5.yml
|
||||||
|
when: ansible_distribution_release == "jessie"
|
||||||
|
|
||||||
- include: php.yml
|
- include: php.yml
|
||||||
|
when: ansible_distribution_release == "stretch"
|
||||||
|
|
||||||
- include: phpmyadmin.yml
|
- include: phpmyadmin.yml
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Install PHP5 packages
|
- name: Install PHP packages
|
||||||
apt:
|
apt:
|
||||||
name: '{{ item }}'
|
name: '{{ item }}'
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- libapache2-mod-php5
|
- libapache2-mod-php7.0
|
||||||
- php5
|
- php7.0
|
||||||
- php5-gd
|
- php7.0-gd
|
||||||
- php5-imap
|
- php7.0-imap
|
||||||
- php5-ldap
|
- php7.0-ldap
|
||||||
- php5-mcrypt
|
- php7.0-mcrypt
|
||||||
- php5-mysql
|
- php7.0-mysql
|
||||||
- php5-pgsql
|
- php7.0-pgsql
|
||||||
|
- php7.0-curl
|
||||||
- php-gettext
|
- php-gettext
|
||||||
- php5-curl
|
- php-ssh2
|
||||||
- libssh2-php
|
|
||||||
tags:
|
tags:
|
||||||
- apache
|
- apache
|
||||||
|
|
||||||
- name: Set variables for php config files
|
- name: Set variables for php config files
|
||||||
set_fact:
|
set_fact:
|
||||||
php5_apache5_defaults_file: /etc/php5/apache2/conf.d/z-evolinux_defaults.ini
|
php7_apache_defaults_file: /etc/php/7.0/apache2/conf.d/z-evolinux_defaults.ini
|
||||||
php5_apache5_custom_file: /etc/php5/apache2/conf.d/zzz-evolinux_custom.ini
|
php7_apache_custom_file: /etc/php/7.0/apache2/conf.d/zzz-evolinux_custom.ini
|
||||||
|
|
||||||
- name: Set default values for PHP
|
- name: Set default values for PHP
|
||||||
ini_file:
|
ini_file:
|
||||||
dest: "{{ php5_apache5_defaults_file }}"
|
dest: "{{ php7_apache_defaults_file }}"
|
||||||
section: PHP
|
section: PHP
|
||||||
option: "{{ item.option }}"
|
option: "{{ item.option }}"
|
||||||
value: "{{ item.value }}"
|
value: "{{ item.value }}"
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
- name: Disable PHP exec function without evoadmin
|
- name: Disable PHP exec function without evoadmin
|
||||||
ini_file:
|
ini_file:
|
||||||
dest: "{{ php5_apache5_defaults_file }}"
|
dest: "{{ php7_apache_defaults_file }}"
|
||||||
section: PHP
|
section: PHP
|
||||||
option: disable_functions
|
option: disable_functions
|
||||||
value: "exec,shell-exec,system,passthru,putenv,popen"
|
value: "exec,shell-exec,system,passthru,putenv,popen"
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
- name: Don't disable PHP exec function with evoadmin
|
- name: Don't disable PHP exec function with evoadmin
|
||||||
ini_file:
|
ini_file:
|
||||||
dest: "{{ php5_apache5_defaults_file }}"
|
dest: "{{ php7_apache_defaults_file }}"
|
||||||
section: PHP
|
section: PHP
|
||||||
option: disable_functions
|
option: disable_functions
|
||||||
value: "shell-exec,system,passthru,putenv,popen"
|
value: "shell-exec,system,passthru,putenv,popen"
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
- name: Custom php.ini
|
- name: Custom php.ini
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ php5_apache5_custom_file }}"
|
dest: "{{ php7_apache_custom_file }}"
|
||||||
content: |
|
content: |
|
||||||
# Put customized values here.
|
# Put customized values here.
|
||||||
force: no
|
force: no
|
||||||
|
|
64
packweb-apache/tasks/php5.yml
Normal file
64
packweb-apache/tasks/php5.yml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: Install PHP5 packages
|
||||||
|
apt:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- libapache2-mod-php5
|
||||||
|
- php5
|
||||||
|
- php5-gd
|
||||||
|
- php5-imap
|
||||||
|
- php5-ldap
|
||||||
|
- php5-mcrypt
|
||||||
|
- php5-mysql
|
||||||
|
- php5-pgsql
|
||||||
|
- php-gettext
|
||||||
|
- php5-curl
|
||||||
|
- libssh2-php
|
||||||
|
tags:
|
||||||
|
- apache
|
||||||
|
|
||||||
|
- name: Set variables for php config files
|
||||||
|
set_fact:
|
||||||
|
php5_apache5_defaults_file: /etc/php5/apache2/conf.d/z-evolinux_defaults.ini
|
||||||
|
php5_apache5_custom_file: /etc/php5/apache2/conf.d/zzz-evolinux_custom.ini
|
||||||
|
|
||||||
|
- name: Set default values for PHP
|
||||||
|
ini_file:
|
||||||
|
dest: "{{ php5_apache5_defaults_file }}"
|
||||||
|
section: PHP
|
||||||
|
option: "{{ item.option }}"
|
||||||
|
value: "{{ item.value }}"
|
||||||
|
mode: "0644"
|
||||||
|
create: yes
|
||||||
|
with_items:
|
||||||
|
- { option: "short_open_tag", value: "Off" }
|
||||||
|
- { option: "expose_php", value: "Off" }
|
||||||
|
- { option: "display_errors", value: "Off" }
|
||||||
|
- { option: "log_errors", value: "On" }
|
||||||
|
- { option: "allow_url_fopen", value: "Off" }
|
||||||
|
notify: reload apache
|
||||||
|
|
||||||
|
- name: Disable PHP exec function without evoadmin
|
||||||
|
ini_file:
|
||||||
|
dest: "{{ php5_apache5_defaults_file }}"
|
||||||
|
section: PHP
|
||||||
|
option: disable_functions
|
||||||
|
value: "exec,shell-exec,system,passthru,putenv,popen"
|
||||||
|
when: not packweb_enable_evoadmin_vhost
|
||||||
|
|
||||||
|
- name: Don't disable PHP exec function with evoadmin
|
||||||
|
ini_file:
|
||||||
|
dest: "{{ php5_apache5_defaults_file }}"
|
||||||
|
section: PHP
|
||||||
|
option: disable_functions
|
||||||
|
value: "shell-exec,system,passthru,putenv,popen"
|
||||||
|
when: packweb_enable_evoadmin_vhost
|
||||||
|
|
||||||
|
- name: Custom php.ini
|
||||||
|
copy:
|
||||||
|
dest: "{{ php5_apache5_custom_file }}"
|
||||||
|
content: |
|
||||||
|
# Put customized values here.
|
||||||
|
force: no
|
Loading…
Reference in a new issue