The lxc-php role can be run on a server without mysql. Attempting to
bindmount the mysql socket in such a case cause the lxc container to
fail to start.
This commit add a variable, lxc_php_create_mysql_link defaulting to
false telling ansible if it should bindmount the MySQL socket to the
container.
Bind mount don't seems to work on a file so the default socket is now
always named mysqld.sock and the configurable variable is
php_conf_mysql_socket_dir that define the directory the socket will be
in.
Add 'php_conf_mysql_default_socket' variable to lxc-php role that
configure both the lxc containers and PHP so that a local MySQL database
may be used through localhost.
The PHP containers will automount /var/run/mysqld/mysqld.sock (the
default path to the mysql socket) to the path defined by the variable
'php_conf_mysql_default_socket' which will be the path used by php to
contact MySQL both with mysqli and PDO_MYSQL.
This is a breaking change as lxc-php should now be called for *each* php
containers we want, with the correct lxc_php_version variable.
Current valid values are :
- php56
- php70
- php73
Other changes includes :
- LXC Containers are created by calling lxc as a dependency of the role.
- Relying on lxc_container module to do commands into the container
(instead of the command module)
- PHP 7.3 container is now a Debian Buster container
- All containers will have opensmtpd to relay emails to postfix on the
host system.