From: Alexander Barton Date: Tue, 20 Oct 2015 08:50:14 +0000 (+0200) Subject: postfix: Add "postfix_mailname" variable X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=AnsibleRoles.git;a=commitdiff_plain;h=aac57481dfc7157e6000762b4d6a9edc0ca9452b postfix: Add "postfix_mailname" variable --- diff --git a/roles/postfix/defaults/main.yml b/roles/postfix/defaults/main.yml new file mode 100644 index 0000000..0469941 --- /dev/null +++ b/roles/postfix/defaults/main.yml @@ -0,0 +1,4 @@ +--- +# defaults file for postfix + +postfix_mailname: "{{ inventory_hostname }}" diff --git a/roles/postfix/tasks/main.yml b/roles/postfix/tasks/main.yml index 3ab9eda..d9497fa 100644 --- a/roles/postfix/tasks/main.yml +++ b/roles/postfix/tasks/main.yml @@ -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 diff --git a/roles/postfix/templates/mailname.j2 b/roles/postfix/templates/mailname.j2 index 1fad51f..422f887 100644 --- a/roles/postfix/templates/mailname.j2 +++ b/roles/postfix/templates/mailname.j2 @@ -1 +1 @@ -{{ inventory_hostname }} +{{ postfix_mailname }}