2019-10-11 21:43:21 +02:00
|
|
|
---
|
|
|
|
|
2020-04-08 17:58:42 +02:00
|
|
|
- name: "{{ lxc_php_version }} - Configure timezone for the container"
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.copy:
|
2019-11-14 16:36:44 +01:00
|
|
|
remote_src: yes
|
|
|
|
src: "/etc/timezone"
|
2023-03-19 11:50:58 +01:00
|
|
|
dest: "{{ lxc_rootfs }}/etc/timezone"
|
2019-10-11 21:43:21 +02:00
|
|
|
|
2020-04-08 17:58:42 +02:00
|
|
|
- name: "{{ lxc_php_version }} - Ensure container's root directory is 755"
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.file:
|
2023-03-19 11:50:58 +01:00
|
|
|
path: "{{ lxc_rootfs }}"
|
2019-10-11 21:43:21 +02:00
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
2020-04-01 15:56:32 +02:00
|
|
|
|
2020-04-08 17:58:42 +02:00
|
|
|
- name: "{{ lxc_php_version }} - Configure mailname for the container"
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.copy:
|
2020-04-01 15:56:32 +02:00
|
|
|
content: "{{ evolinux_hostname }}.{{ evolinux_domain }}\n"
|
2023-03-19 11:50:58 +01:00
|
|
|
dest: "{{ lxc_rootfs }}/etc/mailname"
|
2020-04-01 15:56:32 +02:00
|
|
|
notify: "Restart opensmtpd"
|
2020-04-08 17:58:42 +02:00
|
|
|
|
|
|
|
- name: "{{ lxc_php_version }} - Install misc packages"
|
2023-03-20 23:33:19 +01:00
|
|
|
community.general.lxc_container:
|
2020-04-08 17:58:42 +02:00
|
|
|
name: "{{ lxc_php_version }}"
|
|
|
|
container_command: "DEBIAN_FRONTEND=noninteractive apt install -y cron logrotate git zip unzip"
|
2020-06-04 16:19:48 +02:00
|
|
|
|
|
|
|
- name: "{{ lxc_php_version }} - Add MySQL socket to container default mounts"
|
2023-03-20 23:33:19 +01:00
|
|
|
community.general.lxc_container:
|
2020-06-04 16:19:48 +02:00
|
|
|
name: "{{ lxc_php_version }}"
|
|
|
|
container_config:
|
2020-10-19 17:33:58 +02:00
|
|
|
- "lxc.mount.entry = /run/mysqld {{ php_conf_mysql_socket_dir | replace('/', '', 1) }} none bind,create=dir 0 0"
|
2021-05-09 23:06:42 +02:00
|
|
|
when:
|
|
|
|
- lxc_php_create_mysql_link | bool
|
|
|
|
- php_conf_mysql_socket_dir is not none
|
|
|
|
- php_conf_mysql_socket_dir | length > 0
|
2020-10-19 17:33:58 +02:00
|
|
|
notify: "Restart container"
|
2020-06-05 12:09:19 +02:00
|
|
|
|