Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

91 rinda
2.0KB

  1. ---
  2. - name: opendkim debian packages
  3. apt:
  4. pkg:
  5. - opendkim
  6. - opendkim-tools
  7. - python-openssl
  8. - name: opendkim config
  9. template:
  10. src: opendkim.conf.j2
  11. dest: /etc/opendkim.conf
  12. notify: restart opendkim
  13. - name: opendkim config directory
  14. file:
  15. path: /etc/opendkim
  16. state: directory
  17. owner: opendkim
  18. group: opendkim
  19. mode: 0755
  20. with_items: "{{dkim_domains}}"
  21. - name: dkim keys directories
  22. file:
  23. path: /etc/opendkim/keys/{{item}}
  24. state: directory
  25. owner: opendkim
  26. group: opendkim
  27. mode: 0700
  28. with_items: "{{dkim_domains}}"
  29. - name: dkim private keys
  30. openssl_privatekey:
  31. path: /etc/opendkim/keys/{{item}}/{{dkim_selector}}.private
  32. size: "{{opendkim_key_size}}"
  33. owner: opendkim
  34. group: opendkim
  35. mode: 0600
  36. with_items: "{{dkim_domains}}"
  37. notify: reload opendkim
  38. - name: dkim public keys
  39. openssl_publickey:
  40. privatekey_path: /etc/opendkim/keys/{{item}}/{{dkim_selector}}.private
  41. path: /etc/opendkim/keys/{{item}}/{{dkim_selector}}.public
  42. owner: opendkim
  43. group: opendkim
  44. mode: 0600
  45. with_items: "{{dkim_domains}}"
  46. notify: reload opendkim
  47. - name: read dkim public keys
  48. command: cat /etc/opendkim/keys/{{item}}/{{dkim_selector}}.public
  49. with_items: "{{dkim_domains}}"
  50. changed_when: false
  51. register: _opendkim_read_public_key
  52. - name: show dkim dns records
  53. debug:
  54. msg: "{{_dkim_dns_records}}"
  55. - name: opendkim key table
  56. template:
  57. src: key.table.j2
  58. dest: /etc/opendkim/key.table
  59. group: opendkim
  60. mode: 0640
  61. notify: reload opendkim
  62. - name: opendkim signing table
  63. template:
  64. src: signing.table.j2
  65. dest: /etc/opendkim/signing.table
  66. group: opendkim
  67. mode: 0640
  68. notify: reload opendkim
  69. - name: opendkim trusted hosts
  70. template:
  71. src: trusted.hosts.j2
  72. dest: /etc/opendkim/trusted.hosts
  73. group: opendkim
  74. mode: 0640
  75. notify: reload opendkim
  76. - name: test opendkim configuration
  77. command: opendkim -n
  78. changed_when: false