]> arthur.barton.de Git - AnsibleRoles.git/commitdiff
postfix: Add "postfix_mailname" variable
authorAlexander Barton <alex@barton.de>
Tue, 20 Oct 2015 08:50:14 +0000 (10:50 +0200)
committerAlexander Barton <alex@barton.de>
Tue, 20 Oct 2015 08:50:14 +0000 (10:50 +0200)
roles/postfix/defaults/main.yml [new file with mode: 0644]
roles/postfix/tasks/main.yml
roles/postfix/templates/mailname.j2

diff --git a/roles/postfix/defaults/main.yml b/roles/postfix/defaults/main.yml
new file mode 100644 (file)
index 0000000..0469941
--- /dev/null
@@ -0,0 +1,4 @@
+---
+# defaults file for postfix
+
+postfix_mailname: "{{ inventory_hostname }}"
index 3ab9edab26200dae941fde7e68cf63c3e71a09f2..d9497fa68129c223e7687e0c1cba487a83b0c835 100644 (file)
@@ -9,7 +9,7 @@
   debconf: >
     name=postfix
     question=postfix/mailname
-    value="{{ inventory_hostname }}"
+    value="{{ postfix_mailname }}"
     vtype=select
 
 - name: configure Postfix "destinations"
@@ -20,7 +20,7 @@
   debconf: >
     name=postfix
     question=postfix/destinations
-    value="$myhostname, localhost.$mydomain, localhost"
+    value="{{ postfix_mailname }}, $myhostname, localhost.$mydomain, localhost"
     vtype=select
 
 - name: install "postfix" package
index 1fad51f6ea226be709a0bc3c5b958eabc6dcc145..422f887bd470508d9d44c5137ccd5a76c9100ce7 100644 (file)
@@ -1 +1 @@
-{{ inventory_hostname }}
+{{ postfix_mailname }}