1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/rspamd/tasks/main.yml
Frederik Schwan f2845e141a
add new dkim keys for the upcoming rspamd deployment
also move the dkim key generation to the docs as this is only run ~once
2020-11-22 16:36:25 +01:00

34 lines
1.1 KiB
YAML

---
- name: install rspamd
pacman: name=rspamd state=present
- name: install config
copy: src=local.d/ dest=/etc/rspamd/local.d/ owner=root group=root mode=0644
notify:
- reload rspamd
- name: create rspamd dkim directory
file: path=/var/lib/rspamd/dkim state=directory owner=rspamd group=rspamd mode=0750
# For this to run, you need to generate the keys first
# run
#
# rspamadm dkim_keygen -s dkim-ed25519 -b 0 -d archlinux.org -t ed25519 -k archlinux.org.dkim-ed25519.key
# rspamadm dkim_keygen -s dkim-rsa -b 4096 -d archlinux.org -t rsa -k archlinux.org.dkim-rsa.key
#
# the ouput gives you the DNS entries to add to the terraform files.
# The keys generated need to go to the vault:
# roles/rspamd/files/archlinux.org.dkim-rsa.key
# roles/rspamd/files/archlinux.org.dkim-ed25519.key
#
- name: install DKIM keys
copy: src={{ item }} dest=/var/lib/rspamd/dkim/ owner=rspamd group=rspamd mode=0600
loop:
- archlinux.org.dkim-ed25519.key
- archlinux.org.dkim-rsa.key
notify:
- reload rspamd
- name: start and enable rspamd
service: name=rspamd enabled=yes state=started