Files
ansible-role-directadmin/handlers/main.yml
2023-11-30 15:19:54 +13:00

60 lines
1.3 KiB
YAML

---
- name: Restart DirectAdmin
service:
name: directadmin
state: restarted
- name: Restart Dovecot
service:
name: dovecot
state: restarted
- name: Restart Exim
service:
name: exim
state: restarted
- name: Build phpMyAdmin
command: >
/usr/bin/da build phpmyadmin
- name: Build Roundcube
command: >
/usr/bin/da build roundcube
- name: Rewrite confs
command: >
/usr/bin/da build rewrite_confs
- name: Ensure Dovecot custom for custombuild is present
file:
path: /usr/local/directadmin/custombuild/custom/dovecot/conf
state: directory
- name: Persist mail plugins
copy:
dest: /usr/local/directadmin/custombuild/custom/dovecot/conf/imap_mail_plugins.conf
src: /etc/dovecot/conf/imap_mail_plugins.conf
remote_src: true
- name: Reload Systemd
shell: systemctl daemon-reload
- name: Restart Spamassassin
service:
name: spamassassin
state: restarted
- name: Compile and fix permissions report-spam script
shell: |
sievec report-spam.sieve
chown mail. report-spam.sieve
args:
chdir: /usr/local/bin/dovecot-sieve
- name: Compile and fix permissions report-ham script
shell: |
sievec report-ham.sieve
chown mail. report-ham.sieve
args:
chdir: /usr/local/bin/dovecot-sieve