Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

65 строки
1.3KB

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