Use path variables for mlmmj. Changes #31

This commit is contained in:
Crest 2022-07-04 02:46:45 +02:00
parent 6f18f4a005
commit 493a459466
2 changed files with 9 additions and 10 deletions

View file

@ -1,9 +1,9 @@
---
- name: Restart Postfix
command: s6-svc -wU -T 5000 -ru /run/service/postfix
command: s6-svc -wU -T 5000 -ru {{ s6_scan_dir }}/postfix
- name: Reload Postfix
command: s6-svc -h /run/service/postfix
command: s6-svc -h {{ s6_scan_dir }}/postfix
- name: Rebuild mlmmj virtual aliases
command: postmap hash:/usr/local/etc/postfix/virtual_mlmmj
@ -17,4 +17,4 @@
state: reloaded
- name: Restart mlmmj-maintd
command: s6-svc -wU -T 5000 -ru /run/service/mlmmj-maintd
command: s6-svc -wU -T 5000 -ru {{ s6_scan_dir }}/mlmmj-maintd

View file

@ -19,7 +19,6 @@
home: /var/vmail/mlmmj
shell: /sbin/nologin
- name: Create lists directory
file:
path: /var/vmail/mlmmj
@ -73,7 +72,7 @@
- name: Create mlmmj-maintd service directories
file:
path: '/etc/s6-rc/service/{{ item }}'
path: '{{ s6_etc_dir }}/service/{{ item }}'
state: directory
owner: root
group: wheel
@ -85,7 +84,7 @@
- name: Generate mlmmj-maintd service scripts
template:
dest: '/etc/s6-rc/service/{{ item }}'
dest: '{{ s6_etc_dir }}/service/{{ item }}'
src: '{{ item }}.j2'
mode: 0555
owner: root
@ -97,7 +96,7 @@
- name: Generate mlmmj-maintd service configuration
copy:
dest: '/etc/s6-rc/service/{{ item.name }}'
dest: '{{ s6_etc_dir }}/service/{{ item.name }}'
content: '{{ item.content }}'
mode: 0444
owner: root
@ -113,13 +112,13 @@
meta: flush_handlers
- name: Start mlmmj-maintd
command: fdmove -c 2 1 s6-rc -u -v 2 change mlmmj-maintd
command: fdmove -c 2 1 s6-rc -l {{ s6_live_dir }} -u -v 2 change mlmmj-maintd
register: change
changed_when: change.stdout | length > 0
- name: Enable mlmmj-maintd
lineinfile:
path: /etc/s6-rc/service/enabled/contents
path: '{{ s6_etc_dir }}/service/enabled/contents'
regexp: "^mlmmj-maintd$"
line: "mlmmj-maintd"
notify:
@ -269,7 +268,7 @@
- name: Set moderate subscription
copy:
dest: '/var/vmail/mlmmj/{{ item.name }}/control/submod'
content: ''
content: '{{ item.subscription_moderators | default([]) | join("\n") }}'
force: no
owner: mlmmj
group: mlmmj