SSH: filter more
[ansible.git] / roles / postfix / tasks / main.yml
index 69f83178414a92fd75328672bef0e34cd82041d7..45eb9ee4999e564feba774254dc70bc6b2cc6adf 100644 (file)
@@ -1,17 +1,13 @@
-- name: install postfix
-  apt: name=postfix,bsd-mailx state=latest
-- name: install postfix main.cf
-  register: config_main
-  template:
-    src: templates/main.cf
-    dest: /etc/postfix/main.cf
-- name: reload postfix
-  service: name=postfix state=restarted enabled=yes
-  when: config_main.changed
-- name: delete old local-mail cronjob
-  file: path=/etc/cron.daily/local-mail state=absent
-- name: install check-for-local-mail cronjob
-  copy:
-    src: files/check-for-local-mail
-    dest: /etc/cron.daily/check-for-local-mail
-    mode: u=rwx,g=rx,o=rx
+# base
+- name: create dh2048 file
+  command: openssl dhparam -out {{ postfix.paths.dh2048 }} 2048
+  args:
+    creates: "{{ postfix.paths.dh2048 }}"
+# daemons
+- import_tasks: unbound.yml
+  tags: unbound
+- import_tasks: opendkim.yml
+  tags: opendkim
+  when: postfix.opendkim is defined
+- import_tasks: postfix.yml
+  tags: postfix