Use host network for mail stack containers.

This commit is contained in:
yohan 2024-11-03 16:28:08 +01:00
parent 7f93eb1b57
commit 80907f7beb
3 changed files with 3 additions and 19 deletions

View File

@ -190,20 +190,13 @@
failed_when: false
become: true
- name: Create podman networks
containers.podman.podman_network:
name: "{{ item }}"
become: true
with_items:
- mailnet
- name: Create dovecot container
containers.podman.podman_container:
name: dovecot
image: "{{ private_registry_domain }}/dovecot:530c367996"
state: present
network:
- mailnet
- host
ports:
- 993:993/tcp
- 4190:4190/tcp

View File

@ -68,25 +68,16 @@
failed_when: false
become: true
- name: Create podman networks
containers.podman.podman_network:
name: "{{ item }}"
become: true
with_items:
- mailnet
- name: Create feed2imap container
containers.podman.podman_container:
name: feed2imap
image: "{{ private_registry_domain }}/feed2imap:10d378f5cf"
state: present
network:
- mailnet
- host
volume:
- /usr/local/docker-mounted-files/docker-mail-stack/feed2imaprc:/root/feed2imaprc:Z
- /usr/local/docker-mounted-files/docker-mail-stack/certs/dovecot.crt:/usr/local/share/ca-certificates/dovecot.crt:z
etc_hosts:
imap.scimetis.net: "{{ ansible_default_ipv4.address }}"
generate_systemd:
path: /etc/systemd/system
become: true

View File

@ -94,7 +94,7 @@
image: "{{ private_registry_domain }}/fetchmail:c38bc25e9c"
state: present
network:
- mailnet
- host
volume:
- "/usr/local/docker-mounted-files/docker-mail-stack/fetchmailrc-{{ fetchmail_instance }}:/etc/fetchmailrc:Z"
generate_systemd: