forked from evolix/ansible-roles
Merge branch 'unstable' into add-maxscale
This commit is contained in:
commit
5fe8ff9408
|
@ -15,6 +15,7 @@ The **patch** part changes incrementally at each release.
|
|||
* dovecot: Update munin plugin & configure it
|
||||
* nextcloud: New role to setup a nextcloud instance
|
||||
* redis: variable to force use of port 6379 in instances mode
|
||||
* lxc-php: Allow php containers to contact local MySQL with localhost
|
||||
* maxscale: New role to setup a MariaDB Maxscale server
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -7,6 +7,10 @@ php_conf_html_errors: "Off"
|
|||
php_conf_allow_url_fopen: "Off"
|
||||
php_conf_disable_functions: "exec,shell-exec,system,passthru,popen"
|
||||
|
||||
# Allows accessing a local mysql database using localhost
|
||||
php_conf_mysql_socket_dir: /mysqld
|
||||
php_conf_mysql_default_socket: "{{ php_conf_mysql_socket_dir }}/mysqld.sock"
|
||||
|
||||
lxc_php_version: Null
|
||||
|
||||
lxc_php_container_releases:
|
||||
|
|
|
@ -18,3 +18,9 @@
|
|||
lxc_container:
|
||||
name: "{{ lxc_php_version }}"
|
||||
container_command: "systemctl restart opensmtpd"
|
||||
|
||||
- name: Restart container
|
||||
lxc_container:
|
||||
name: "{{ lxc_php_version }}"
|
||||
state: restarted
|
||||
|
||||
|
|
|
@ -18,8 +18,16 @@
|
|||
dest: "/var/lib/lxc/{{ lxc_php_version }}/rootfs/etc/mailname"
|
||||
notify: "Restart opensmtpd"
|
||||
|
||||
|
||||
- name: "{{ lxc_php_version }} - Install misc packages"
|
||||
lxc_container:
|
||||
name: "{{ lxc_php_version }}"
|
||||
container_command: "DEBIAN_FRONTEND=noninteractive apt install -y cron logrotate git zip unzip"
|
||||
|
||||
- name: "{{ lxc_php_version }} - Add MySQL socket to container default mounts"
|
||||
lxc_container:
|
||||
name: "{{ lxc_php_version }}"
|
||||
container_config:
|
||||
- "lxc.mount.entry = /run/mysqld {{ php_conf_mysql_socket_dir | replace('/', '', 1) }} none bind,create=dir 0 0"
|
||||
when: php_conf_mysql_socket_dir is string
|
||||
notify: "Restart container"
|
||||
|
||||
|
|
|
@ -6,3 +6,11 @@ log_errors = {{ php_conf_log_errors }}
|
|||
html_errors = {{ php_conf_html_errors }}
|
||||
allow_url_fopen = {{ php_conf_allow_url_fopen }}
|
||||
disable_functions = {{ php_conf_disable_functions }}
|
||||
|
||||
{% if php_conf_mysql_socket_dir %}
|
||||
[Pdo_mysql]
|
||||
pdo_mysql.default_socket = {{ php_conf_mysql_default_socket }}
|
||||
|
||||
[MySQLi]
|
||||
mysqli.default_socket = {{ php_conf_mysql_default_socket }}
|
||||
{% endif %}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
[mysqld]
|
||||
|
||||
###### Connexions
|
||||
# Path to socket
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
# Maximum de connexions concurrentes (defaut = 100)... provoque un "Too many connections"
|
||||
max_connections = 250
|
||||
# Maximum de connexions en attente en cas de max_connections atteint (defaut = 50)
|
||||
|
@ -60,3 +62,6 @@ character-set-server=utf8
|
|||
collation-server=utf8_general_ci
|
||||
# Patch MySQL 5.5.53
|
||||
secure-file-priv = ""
|
||||
|
||||
[client]
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
|
|
|
@ -21,11 +21,11 @@ dependencies:
|
|||
- { role: evolix/apache }
|
||||
- { role: evolix/php, php_apache_enable: True, when: packweb_apache_modphp }
|
||||
- { role: evolix/php, php_fpm_enable: True, when: packweb_apache_fpm }
|
||||
- { role: evolix/lxc-php, lxc_php_version: php56, when: "'php56' in packweb_multiphp_versions" }
|
||||
- { role: evolix/lxc-php, lxc_php_version: php70, when: "'php70' in packweb_multiphp_versions" }
|
||||
- { role: evolix/lxc-php, lxc_php_version: php73, when: "'php73' in packweb_multiphp_versions" }
|
||||
- { role: evolix/squid, squid_localproxy_enable: True }
|
||||
- { role: evolix/mysql, when: packweb_mysql_variant == "debian" }
|
||||
- { role: evolix/mysql-oracle, when: packweb_mysql_variant == "oracle" }
|
||||
- { role: evolix/lxc-php, lxc_php_version: php56, when: "'php56' in packweb_multiphp_versions" }
|
||||
- { role: evolix/lxc-php, lxc_php_version: php70, when: "'php70' in packweb_multiphp_versions" }
|
||||
- { role: evolix/lxc-php, lxc_php_version: php73, when: "'php73' in packweb_multiphp_versions" }
|
||||
- { role: evolix/webapps/evoadmin-web, evoadmin_enable_vhost: "{{ packweb_enable_evoadmin_vhost }}", evoadmin_multiphp_versions: "{{ packweb_multiphp_versions }}" }
|
||||
- { role: evolix/evoacme }
|
||||
|
|
Loading…
Reference in a new issue