ansible-roles/lxc-php/tasks/misc.yml
Ludovic Poujol e6f2bbb331 lxc-php: An almost complete rewrite ** BREAKING **
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.
2020-04-01 17:17:00 +02:00

27 lines
684 B
YAML

---
- name: Configure opensmtpd
template:
src: smtpd.conf.j2
dest: "/var/lib/lxc/{{ lxc_php_version }}/rootfs/etc/smtpd.conf"
mode: "0644"
notify: "Restart opensmtpd"
- name: Copy using inline content
copy:
content: "{{ evolinux_hostname }}.{{ evolinux_domain }}\n"
dest: "/var/lib/lxc/{{ lxc_php_version }}/rootfs/etc/mailname"
notify: "Restart opensmtpd"
- name: Configure timezone
copy:
remote_src: yes
src: "/etc/timezone"
dest: "/var/lib/lxc/{{ lxc_php_version }}/rootfs/etc/timezone"
- name: Ensure containers root directory is 755
file:
path: "/var/lib/lxc/{{ lxc_php_version }}/rootfs"
state: directory
mode: '0755'