You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 line
918B

  1. ---
  2. - name: install package
  3. apt:
  4. pkg: "{{ item }}"
  5. with_items:
  6. - dovecot-imapd
  7. - dovecot-lmtpd
  8. - name: dovecot configuration files
  9. template:
  10. src: "{{ item }}.j2"
  11. dest: /etc/dovecot/{{ item }}
  12. with_items:
  13. - dovecot.conf
  14. - conf.d/10-mail.conf
  15. - conf.d/10-auth.conf
  16. - conf.d/auth-sql.conf.ext
  17. - dovecot-sql.conf.ext
  18. notify:
  19. - reload dovecot
  20. - name: postfixadmin mysql user
  21. mysql_user:
  22. name: "{{dovecot_postfixadmin_mysql_username}}"
  23. password: "{{dovecot_postfixadmin_mysql_password}}"
  24. priv: "{{dovecot_postfixadmin_mysql_database}}.*:SELECT"
  25. state: present
  26. - name: configuration pull directory
  27. local_action: file
  28. args:
  29. path: ~/host_files/{{inventory_hostname}}/etc
  30. state: directory
  31. - name: pull configuration
  32. synchronize:
  33. src: /etc/dovecot
  34. dest: ~/host_files/{{inventory_hostname}}/etc/
  35. mode: pull
  36. recursive: true