summaryrefslogtreecommitdiff
path: root/ansible/roles/mox/tasks/main.yml
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-08-12 13:57:11 +0100
committerJoe Carstairs <me@joeac.net>2026-08-12 16:11:52 +0100
commit443bdb36040cbd749588e14c9569d276f8e0b6e9 (patch)
tree283cc3def6c6e7ec9fae66f7a46f6fa780edb7a6 /ansible/roles/mox/tasks/main.yml
parent8c67975215e701e44edd50f7681fbea252ba9aff (diff)
don't overwrite permissions on mox files as mox does this
Diffstat (limited to 'ansible/roles/mox/tasks/main.yml')
-rw-r--r--ansible/roles/mox/tasks/main.yml43
1 files changed, 8 insertions, 35 deletions
diff --git a/ansible/roles/mox/tasks/main.yml b/ansible/roles/mox/tasks/main.yml
index 72ed7c3..2e41a4c 100644
--- a/ansible/roles/mox/tasks/main.yml
+++ b/ansible/roles/mox/tasks/main.yml
@@ -10,82 +10,57 @@
- tls
append: false
-- name: Assign mox as owner of ~mox home directory
- register: mox_home_dir
- ansible.builtin.file:
- path: ~mox
- owner: mox
- group: mox
- mode: "750"
-
- name: Create mox configuration directory
register: mox_conf_dir
ansible.builtin.file:
path: ~mox/config/
owner: mox
- group: mox
- mode: "770"
- name: Create DKIM private keys directory
register: mox_dkim_dir
ansible.builtin.file:
path: ~mox/config/dkim
- owner: mox
- group: mox
- mode: "770"
- name: Install DKIM private key A
register: mox_dkim_a
ansible.builtin.copy:
src: dkim/2026a._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
dest: ~mox/config/dkim/2026a._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
- owner: mox
- group: mox
- mode: "660"
+ mode: o-rwx
- name: Install DKIM private key B
register: mox_dkim_b
ansible.builtin.copy:
src: dkim/2026b._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
dest: ~mox/config/dkim/2026b._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
- owner: mox
- group: mox
- mode: "660"
+ mode: o-rwx
- name: Install adminpasswd
register: mox_adminpasswd
ansible.builtin.copy:
src: adminpasswd
dest: ~mox/config/adminpasswd
- owner: mox
- group: mox
- mode: "660"
+ mode: o-rwx
- name: Install mox configuration
register: mox_conf
ansible.builtin.template:
src: mox.conf
dest: ~mox/config/mox.conf
- owner: mox
- group: mox
- mode: "660"
+ mode: o-rwx
- name: Install mox domain configuration
register: mox_domain_conf
ansible.builtin.template:
src: domains.conf
dest: ~mox/config/domains.conf
- owner: mox
- group: mox
- mode: "660"
+ mode: o-rwx
- name: Create mox data directory
ansible.builtin.file:
path: ~mox/data
state: directory
- owner: mox
- group: mox
- mode: "770"
+ mode: o-rwx
- name: Create unbound configuration directory
ansible.builtin.file:
@@ -141,8 +116,7 @@
- name: Restart mox service and configure to start on boot
when:
- mox_home_dir is changed
- or mox_conf_dir is changed
+ mox_conf_dir is changed
or mox_dkim_dir is change
or mox_dkim_a is change
or mox_dkim_b is change
@@ -158,8 +132,7 @@
- name: Start mox service and configure to start on boot
when: not (
- mox_home_dir is changed
- or mox_conf_dir is changed
+ mox_conf_dir is changed
or mox_dkim_dir is change
or mox_dkim_a is change
or mox_dkim_b is change