diff options
author | Matthieu Saulnier <fantom@fedoraproject.org> | 2018-12-20 19:28:40 +0100 |
---|---|---|
committer | Matthieu Saulnier <fantom@fedoraproject.org> | 2018-12-20 19:28:40 +0100 |
commit | 9bc3963fc2c999b4fd09cf66c62fb310d21be466 (patch) | |
tree | a1364983885169d55fbda005205f87058f6eb0dd | |
parent | eb6b05e385d7e477f467f71c08c2171ad66331d3 (diff) | |
download | playbooks-ansible-9bc3963fc2c999b4fd09cf66c62fb310d21be466.tar.gz playbooks-ansible-9bc3963fc2c999b4fd09cf66c62fb310d21be466.tar.xz playbooks-ansible-9bc3963fc2c999b4fd09cf66c62fb310d21be466.zip |
Add mtahost host variable
-rw-r--r-- | host_vars/192.168.0.25 | 1 | ||||
-rw-r--r-- | host_vars/d72vewh3wa4lwpaj.onion | 1 | ||||
-rw-r--r-- | host_vars/manchester.casperlefantom.net | 1 | ||||
-rw-r--r-- | host_vars/manchester.home.casperlefantom.net | 1 | ||||
-rw-r--r-- | roles/mtaserver/templates/main.cf.j2 | 4 |
5 files changed, 7 insertions, 1 deletions
diff --git a/host_vars/192.168.0.25 b/host_vars/192.168.0.25 index 334487e..274b369 100644 --- a/host_vars/192.168.0.25 +++ b/host_vars/192.168.0.25 @@ -1,4 +1,5 @@ # mtaserver +mtahost: mail # mx1, mx2... mtadomain: - casperlefantom.net - jaysfoodventure.com diff --git a/host_vars/d72vewh3wa4lwpaj.onion b/host_vars/d72vewh3wa4lwpaj.onion index 334487e..274b369 100644 --- a/host_vars/d72vewh3wa4lwpaj.onion +++ b/host_vars/d72vewh3wa4lwpaj.onion @@ -1,4 +1,5 @@ # mtaserver +mtahost: mail # mx1, mx2... mtadomain: - casperlefantom.net - jaysfoodventure.com diff --git a/host_vars/manchester.casperlefantom.net b/host_vars/manchester.casperlefantom.net index 334487e..274b369 100644 --- a/host_vars/manchester.casperlefantom.net +++ b/host_vars/manchester.casperlefantom.net @@ -1,4 +1,5 @@ # mtaserver +mtahost: mail # mx1, mx2... mtadomain: - casperlefantom.net - jaysfoodventure.com diff --git a/host_vars/manchester.home.casperlefantom.net b/host_vars/manchester.home.casperlefantom.net index 334487e..274b369 100644 --- a/host_vars/manchester.home.casperlefantom.net +++ b/host_vars/manchester.home.casperlefantom.net @@ -1,4 +1,5 @@ # mtaserver +mtahost: mail # mx1, mx2... mtadomain: - casperlefantom.net - jaysfoodventure.com diff --git a/roles/mtaserver/templates/main.cf.j2 b/roles/mtaserver/templates/main.cf.j2 index 7a3a0a2..d0d5213 100644 --- a/roles/mtaserver/templates/main.cf.j2 +++ b/roles/mtaserver/templates/main.cf.j2 @@ -93,7 +93,9 @@ mail_owner = postfix # #myhostname = host.domain.tld #myhostname = virtual.domain.tld -{% if mtadomain is defined %} +{% if mtadomain is defined and mtahost is defined %} +myhostname = {{ mtahost }}.{{ mtadomain.0 }} +{% elif mtadomain is defined %} myhostname = mail.{{ mtadomain.0 }} {% elif ansible_default_ipv4.network == localnet %} myhostname = {{ ansible_hostname }}.home.casperlefantom.net |