Use path variables for Postfix. Changes #31

This commit is contained in:
Crest 2022-07-04 02:53:23 +02:00
parent 96b6c8fe4b
commit 6a8cee385b
2 changed files with 8 additions and 8 deletions

View file

@ -5,13 +5,13 @@
state: reloaded
- 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: Restart Postfix log
command: s6-svc -wU -T 5000 -ru /run/service/postfix-log
command: s6-svc -wU -T 5000 -ru {{ s6_scan_dir }}/postfix-log
- name: Reload Postfix
command: s6-svc -h /run/service/postfix
command: s6-svc -h {{ s6_scan_dir }}/postfix
- name: Rebuild Postfix maps
command: 'postmap {{ item.type }}:{{ item.name }}'

View file

@ -53,7 +53,7 @@
- name: Create Postfix service directories
file:
path: '/etc/s6-rc/service/{{ item }}'
path: '{{ s6_etc_dir }}/service/{{ item }}'
state: directory
owner: root
group: wheel
@ -62,7 +62,7 @@
- name: Generate Postfix service scripts
template:
dest: '/etc/s6-rc/service/{{ item }}'
dest: '{{ s6_etc_dir }}/service/{{ item }}'
src: '{{ item }}.j2'
mode: 0555
owner: root
@ -74,7 +74,7 @@
- name: Generate Postfix service configuration
copy:
dest: '/etc/s6-rc/service/{{ item.name }}'
dest: '{{ s6_etc_dir }}/service/{{ item.name }}'
content: '{{ item.content }}'
mode: 0444
owner: root
@ -129,13 +129,13 @@
meta: flush_handlers
- name: Start Postfix
command: fdmove -c 2 1 s6-rc -u -v 2 change postfix
command: fdmove -c 2 1 s6-rc -l {{ s6_live_dir }} -u -v 2 change postfix
register: change
changed_when: change.stdout | length > 0
- name: Enable Postfix
lineinfile:
path: /etc/s6-rc/service/enabled/contents
path: '{{ s6_etc_dir }}/service/enabled/contents'
regexp: "^postfix$"
line: "postfix"
notify: