]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/postfix/tasks/main.yml
ansible-lint: Fix "Octal file permissions must contain leading zero" warnings
[AnsibleRoles.git] / roles / postfix / tasks / main.yml
index 3ab9edab26200dae941fde7e68cf63c3e71a09f2..0dd6ec1a18b2da4e2f75fb5f49f7aadada49f8bb 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
@@ -39,7 +39,7 @@
   template: >
     dest=/etc/mailname
     group=root
-    mode=644
+    mode=0644
     owner=root
     src=mailname.j2
   notify:
@@ -53,7 +53,7 @@
     dest=/etc/postfix/main.cf
     group=root
     line="myorigin = /etc/mailname"
-    mode=644
+    mode=0644
     owner=root
     regexp="^myorigin"
   notify:
     dest=/etc/postfix/main.cf
     group=root
     line="myhostname = {{ inventory_hostname }}"
-    mode=644
+    mode=0644
     owner=root
     regexp="^myhostname"
   notify:
     - restart "postfix"
 
-- name: ensure service "postfix" is enabled and running
+- name: ensure service "postfix" is enabled and started
   tags:
     - mail
     - postfix
@@ -81,4 +81,4 @@
   service: >
     enabled=yes
     name=postfix
-    state=running
+    state=started