ansible-roles/lxc-php/tasks/mail_opensmtpd.yml
2023-11-21 16:13:07 +01:00

24 lines
879 B
YAML

---
- name: "{{ lxc_php_container_name }} - Install opensmtpd"
community.general.lxc_container:
name: "{{ lxc_php_container_name }}"
container_command: "DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y opensmtpd"
- name: "{{ lxc_php_container_name }} - Configure opensmtpd (in the container)"
ansible.builtin.template:
src: smtpd.conf.j2
dest: "{{ lxc_rootfs }}/etc/smtpd.conf"
mode: "0644"
notify: "Restart opensmtpd"
when: lxc_php_container_releases[lxc_php_version] in ["jessie", "stretch", "buster"]
- name: "{{ lxc_php_container_name }} - Configure opensmtpd (in the container)"
ansible.builtin.template:
src: smtpd.conf.bullseye.j2
dest: "{{ lxc_rootfs }}/etc/smtpd.conf"
mode: "0644"
notify: "Restart opensmtpd"
when: not lxc_php_container_releases[lxc_php_version] in ["jessie", "stretch", "buster"]