Make mail role generic
This commit is contained in:
parent
a94671b747
commit
2baaaa59e0
4 changed files with 14 additions and 7 deletions
2
mail.yml
2
mail.yml
|
@ -4,3 +4,5 @@
|
||||||
- role: mail
|
- role: mail
|
||||||
users: "{{ mail_users }}"
|
users: "{{ mail_users }}"
|
||||||
postgresql_url: postgres://maddy:{{ postgresql_users.maddy }}@postgresql:5432/maddy?sslmode=disable
|
postgresql_url: postgres://maddy:{{ postgresql_users.maddy }}@postgresql:5432/maddy?sslmode=disable
|
||||||
|
domain: comfycamp.space
|
||||||
|
hostname: mail.comfycamp.space
|
||||||
|
|
|
@ -8,3 +8,11 @@ argument_specs:
|
||||||
users:
|
users:
|
||||||
type: dict
|
type: dict
|
||||||
default: {}
|
default: {}
|
||||||
|
domain:
|
||||||
|
type: str
|
||||||
|
description: "example.com"
|
||||||
|
required: true
|
||||||
|
hostname:
|
||||||
|
type: str
|
||||||
|
description: "mx.example.com"
|
||||||
|
required: true
|
||||||
|
|
|
@ -21,9 +21,6 @@
|
||||||
networks:
|
networks:
|
||||||
- name: mail
|
- name: mail
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
env:
|
|
||||||
MADDY_HOSTNAME: mail.comfycamp.space
|
|
||||||
MADDY_DOMAIN: comfycamp.space
|
|
||||||
ports:
|
ports:
|
||||||
- 25:25
|
- 25:25
|
||||||
- 143:143
|
- 143:143
|
||||||
|
@ -32,8 +29,8 @@
|
||||||
- 993:993
|
- 993:993
|
||||||
volumes:
|
volumes:
|
||||||
- maddy:/data
|
- maddy:/data
|
||||||
- /etc/letsencrypt/live/comfycamp.space/fullchain.pem:/etc/tls/fullchain.pem:ro
|
- /etc/letsencrypt/live/{{ domain }}/fullchain.pem:/etc/tls/fullchain.pem:ro
|
||||||
- /etc/letsencrypt/live/comfycamp.space/privkey.pem:/etc/tls/privkey.pem:ro
|
- /etc/letsencrypt/live/{{ domain }}/privkey.pem:/etc/tls/privkey.pem:ro
|
||||||
recreate: "{{ maddy_conf.changed }}"
|
recreate: "{{ maddy_conf.changed }}"
|
||||||
- name: Get users
|
- name: Get users
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
# Base variables
|
# Base variables
|
||||||
|
|
||||||
$(hostname) = {env:MADDY_HOSTNAME}
|
$(hostname) = {{ hostname }}
|
||||||
$(primary_domain) = {env:MADDY_DOMAIN}
|
$(primary_domain) = {{ domain }}
|
||||||
$(local_domains) = $(primary_domain)
|
$(local_domains) = $(primary_domain)
|
||||||
|
|
||||||
# public private
|
# public private
|
||||||
|
|
Loading…
Reference in a new issue