Initial commit

This commit is contained in:
2023-11-30 15:19:54 +13:00
commit 3c0ab7279f
25 changed files with 1205 additions and 0 deletions

60
handlers/main.yml Normal file
View File

@@ -0,0 +1,60 @@
---
- 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