Use path variables for mlmmj. Changes #31
This commit is contained in:
parent
6f18f4a005
commit
493a459466
2 changed files with 9 additions and 10 deletions
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
- name: Restart Postfix
|
- 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
|
- name: Reload Postfix
|
||||||
command: s6-svc -h /run/service/postfix
|
command: s6-svc -h {{ s6_scan_dir }}/postfix
|
||||||
|
|
||||||
- name: Rebuild mlmmj virtual aliases
|
- name: Rebuild mlmmj virtual aliases
|
||||||
command: postmap hash:/usr/local/etc/postfix/virtual_mlmmj
|
command: postmap hash:/usr/local/etc/postfix/virtual_mlmmj
|
||||||
|
@ -17,4 +17,4 @@
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
||||||
- name: Restart mlmmj-maintd
|
- 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
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
home: /var/vmail/mlmmj
|
home: /var/vmail/mlmmj
|
||||||
shell: /sbin/nologin
|
shell: /sbin/nologin
|
||||||
|
|
||||||
|
|
||||||
- name: Create lists directory
|
- name: Create lists directory
|
||||||
file:
|
file:
|
||||||
path: /var/vmail/mlmmj
|
path: /var/vmail/mlmmj
|
||||||
|
@ -73,7 +72,7 @@
|
||||||
|
|
||||||
- name: Create mlmmj-maintd service directories
|
- name: Create mlmmj-maintd service directories
|
||||||
file:
|
file:
|
||||||
path: '/etc/s6-rc/service/{{ item }}'
|
path: '{{ s6_etc_dir }}/service/{{ item }}'
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: wheel
|
group: wheel
|
||||||
|
@ -85,7 +84,7 @@
|
||||||
|
|
||||||
- name: Generate mlmmj-maintd service scripts
|
- name: Generate mlmmj-maintd service scripts
|
||||||
template:
|
template:
|
||||||
dest: '/etc/s6-rc/service/{{ item }}'
|
dest: '{{ s6_etc_dir }}/service/{{ item }}'
|
||||||
src: '{{ item }}.j2'
|
src: '{{ item }}.j2'
|
||||||
mode: 0555
|
mode: 0555
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -97,7 +96,7 @@
|
||||||
|
|
||||||
- name: Generate mlmmj-maintd service configuration
|
- name: Generate mlmmj-maintd service configuration
|
||||||
copy:
|
copy:
|
||||||
dest: '/etc/s6-rc/service/{{ item.name }}'
|
dest: '{{ s6_etc_dir }}/service/{{ item.name }}'
|
||||||
content: '{{ item.content }}'
|
content: '{{ item.content }}'
|
||||||
mode: 0444
|
mode: 0444
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -113,13 +112,13 @@
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: Start mlmmj-maintd
|
- 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
|
register: change
|
||||||
changed_when: change.stdout | length > 0
|
changed_when: change.stdout | length > 0
|
||||||
|
|
||||||
- name: Enable mlmmj-maintd
|
- name: Enable mlmmj-maintd
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/s6-rc/service/enabled/contents
|
path: '{{ s6_etc_dir }}/service/enabled/contents'
|
||||||
regexp: "^mlmmj-maintd$"
|
regexp: "^mlmmj-maintd$"
|
||||||
line: "mlmmj-maintd"
|
line: "mlmmj-maintd"
|
||||||
notify:
|
notify:
|
||||||
|
@ -269,7 +268,7 @@
|
||||||
- name: Set moderate subscription
|
- name: Set moderate subscription
|
||||||
copy:
|
copy:
|
||||||
dest: '/var/vmail/mlmmj/{{ item.name }}/control/submod'
|
dest: '/var/vmail/mlmmj/{{ item.name }}/control/submod'
|
||||||
content: ''
|
content: '{{ item.subscription_moderators | default([]) | join("\n") }}'
|
||||||
force: no
|
force: no
|
||||||
owner: mlmmj
|
owner: mlmmj
|
||||||
group: mlmmj
|
group: mlmmj
|
||||||
|
|
Loading…
Reference in a new issue