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.

main.yml 1.2KB

il y a 7 ans
il y a 7 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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: /home/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-master.conf
  30. - conf.d/10-mail.conf
  31. - conf.d/10-auth.conf
  32. - conf.d/auth-sql.conf.ext
  33. - dovecot-sql.conf.ext
  34. - conf.d/10-ssl.conf
  35. - conf.d/20-lmtp.conf
  36. notify:
  37. - reload dovecot
  38. - name: postfixadmin mysql user
  39. mysql_user:
  40. name: "{{dovecot_postfixadmin_mysql_username}}"
  41. password: "{{dovecot_postfixadmin_mysql_password}}"
  42. priv: "{{dovecot_postfixadmin_mysql_database}}.*:SELECT"
  43. state: present
  44. - name: configuration pull directory
  45. local_action: file
  46. args:
  47. path: ~/host_files/{{inventory_hostname}}/etc
  48. state: directory
  49. - name: pull configuration
  50. synchronize:
  51. src: /etc/dovecot
  52. dest: ~/host_files/{{inventory_hostname}}/etc/
  53. mode: pull
  54. recursive: true