Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

rspamd.yml 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. # Installs and configures the Rspamd spam filtering system.
  3. - name: Ensure repository key for Rspamd is in place
  4. apt_key: url=https://rspamd.com/apt-stable/gpg.key state=present
  5. when: ansible_architecture != "armv7l"
  6. tags:
  7. - dependencies
  8. - name: Ensure yunohost repository key for Rspamd is in place for ARM
  9. apt_key: url=http://repo.yunohost.org/debian/yunohost.asc state=present
  10. when: ansible_architecture == "armv7l"
  11. tags:
  12. - dependencies
  13. - name: Add Rspamd repository
  14. apt_repository: repo="deb https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
  15. when: ansible_architecture != "armv7l"
  16. tags:
  17. - dependencies
  18. - name: Add yunohost Rspamd repository for ARM
  19. apt_repository: repo="deb http://repo.yunohost.org/debian {{ ansible_distribution_release }} stable"
  20. when: ansible_architecture == "armv7l"
  21. tags:
  22. - dependencies
  23. - name: Install Rspamd and Redis
  24. apt: pkg={{ item }} state=present update_cache=yes
  25. with_items:
  26. - rspamd
  27. - redis-server
  28. tags:
  29. - dependencies
  30. - name: Copy DMARC configuration into place
  31. template: src=etc_rspamd_local.d_dmarc.conf.j2 dest=/etc/rspamd/local.d/dmarc.conf owner=root group=root mode="0644"
  32. notify: restart rspamd
  33. - name: Configure Rspamd to use Redis
  34. copy: src=etc_rspamd_local.d_redis.conf dest=/etc/rspamd/local.d/redis.conf owner=root group=root mode="0644"
  35. notify: restart rspamd
  36. - name: Copy DKIM configuration into place
  37. copy: src=etc_rspamd_override.d_dkim_signing.conf dest=/etc/rspamd/override.d/dkim_signing.conf owner=root group=root mode="0644"
  38. notify: restart rspamd
  39. - name: Create dkim key directory
  40. file: path=/var/lib/rspamd/dkim state=directory owner=_rspamd group=_rspamd
  41. - name: Generate DKIM keys
  42. shell: rspamadm dkim_keygen -s default -d {{ item.name }} -k {{ item.name }}.default.key > {{ item.name }}.default.txt
  43. args:
  44. creates: /var/lib/rspamd/dkim/{{ item.name }}.default.key
  45. chdir: /var/lib/rspamd/dkim/
  46. with_items: "{{ virtual_domains }}"
  47. - name: Start redis
  48. service: name=redis-server state=started