2020-04-01 15:56:32 +02:00
|
|
|
---
|
|
|
|
|
2023-10-31 17:44:55 +01:00
|
|
|
- name: "{{ lxc_php_container_name }} - Install opensmtpd"
|
2023-03-20 23:33:19 +01:00
|
|
|
community.general.lxc_container:
|
2023-10-31 17:44:55 +01:00
|
|
|
name: "{{ lxc_php_container_name }}"
|
2020-06-05 11:01:22 +02:00
|
|
|
container_command: "DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y opensmtpd"
|
2020-04-08 17:58:42 +02:00
|
|
|
|
2023-10-31 17:44:55 +01:00
|
|
|
- name: "{{ lxc_php_container_name }} - Configure opensmtpd (in the container)"
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.template:
|
2020-04-01 15:56:32 +02:00
|
|
|
src: smtpd.conf.j2
|
2023-03-19 11:50:58 +01:00
|
|
|
dest: "{{ lxc_rootfs }}/etc/smtpd.conf"
|
2020-04-01 15:56:32 +02:00
|
|
|
mode: "0644"
|
|
|
|
notify: "Restart opensmtpd"
|
2021-11-05 11:34:21 +01:00
|
|
|
when: lxc_php_container_releases[lxc_php_version] in ["jessie", "stretch", "buster"]
|
|
|
|
|
|
|
|
|
2023-10-31 17:44:55 +01:00
|
|
|
- name: "{{ lxc_php_container_name }} - Configure opensmtpd (in the container)"
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.template:
|
2021-11-05 11:34:21 +01:00
|
|
|
src: smtpd.conf.bullseye.j2
|
2023-03-19 11:50:58 +01:00
|
|
|
dest: "{{ lxc_rootfs }}/etc/smtpd.conf"
|
2021-11-05 11:34:21 +01:00
|
|
|
mode: "0644"
|
|
|
|
notify: "Restart opensmtpd"
|
|
|
|
when: not lxc_php_container_releases[lxc_php_version] in ["jessie", "stretch", "buster"]
|