Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

60 lignes
1.2KB

  1. ---
  2. - name: install package
  3. apt:
  4. pkg: "{{ item }}"
  5. with_items:
  6. - dovecot-imapd
  7. - dovecot-lmtpd
  8. - dovecot-mysql
  9. notify:
  10. - reload dovecot
  11. - name: vmail group
  12. group:
  13. name: vmail
  14. gid: "{{vmail_gid}}"
  15. system: yes
  16. - name: vmail user
  17. user:
  18. name: vmail
  19. uid: "{{vmail_uid}}"
  20. group: vmail
  21. system: yes
  22. home: /var/vmail
  23. - name: dovecot configuration files
  24. template:
  25. src: "{{ item }}.j2"
  26. dest: /etc/dovecot/{{ item }}
  27. with_items:
  28. - dovecot.conf
  29. - conf.d/10-mail.conf
  30. - conf.d/10-auth.conf
  31. - conf.d/auth-sql.conf.ext
  32. - dovecot-sql.conf.ext
  33. - conf.d/10-ssl.conf
  34. notify:
  35. - reload dovecot
  36. - name: postfixadmin mysql user
  37. mysql_user:
  38. name: "{{dovecot_postfixadmin_mysql_username}}"
  39. password: "{{dovecot_postfixadmin_mysql_password}}"
  40. priv: "{{dovecot_postfixadmin_mysql_database}}.*:SELECT"
  41. state: present
  42. - name: configuration pull directory
  43. local_action: file
  44. args:
  45. path: ~/host_files/{{inventory_hostname}}/etc
  46. state: directory
  47. - name: pull configuration
  48. synchronize:
  49. src: /etc/dovecot
  50. dest: ~/host_files/{{inventory_hostname}}/etc/
  51. mode: pull
  52. recursive: true