journalwatch: ignore failed SSH attempts... there are just too many...
[ansible.git] / roles / postfix / tasks / main.yml
index 07c344e2136204001e407f61dedc8ece1ce926e3..f71486e77c66edef061cb4175d04f713eed9d2a2 100644 (file)
@@ -1,20 +1,11 @@
-- name: install postfix
-  apt: name=postfix,bsd-mailx state=latest
-- name: install postfix config
-  register: config_main
-  template:
-    src: templates/{{ item }}
-    dest: /etc/postfix/{{ item }}
-  with_items:
-  - main.cf
-  - master.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: opendkim.yml
+  tags: opendkim
+  when: postfix.opendkim is defined
+- import_tasks: postfix.yml
+  tags: postfix