mirror of https://dev.ccchb.de/ccchb/ansible.git
Use path variables for Rspamd. Changes #31
This commit is contained in:
parent
e7eeb4039a
commit
53f05a7071
|
@ -5,16 +5,16 @@
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
||||||
- name: Restart Rspamd
|
- name: Restart Rspamd
|
||||||
command: s6-svc -wR -T 5000 -ru /run/service/rspamd
|
command: s6-svc -wR -T 5000 -ru {{ s6_scan_dir }}/rspamd
|
||||||
|
|
||||||
- name: Restart Rspamd log
|
- name: Restart Rspamd log
|
||||||
command: s6-svc -wR -T 5000 -ru /run/service/rspamd-log
|
command: s6-svc -wR -T 5000 -ru {{ s6_scan_dir }}/rspamd-log
|
||||||
|
|
||||||
- name: Restart HAProxy
|
- name: Restart HAProxy
|
||||||
command: s6-svc -wU -T 5000 -ru /run/service/haproxy
|
command: s6-svc -wU -T 5000 -ru {{ s6_scan_dir }}/haproxy
|
||||||
|
|
||||||
- name: Restart HAProxy log
|
- name: Restart HAProxy log
|
||||||
command: s6-svc -wU -T 5000 -ru /run/service/haproxy-log
|
command: s6-svc -wU -T 5000 -ru {{ s6_scan_dir }}/haproxy-log
|
||||||
|
|
||||||
- name: Reload HAProxy
|
- name: Reload HAProxy
|
||||||
command: s6-svc -2 /run/service/haproxy
|
command: s6-svc -2 {{ s6_scan_dir }}/haproxy
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
- name: Create Rspamd service directories
|
- name: Create Rspamd 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
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
- name: Generate Rspamd service scripts
|
- name: Generate Rspamd 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
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
- name: Generate Rspamd service configuration
|
- name: Generate Rspamd 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
|
||||||
|
@ -86,13 +86,13 @@
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: Start Rspamd
|
- name: Start Rspamd
|
||||||
command: fdmove -c 2 1 s6-rc -u -v 2 -t 15000 change rspamd
|
command: fdmove -c 2 1 s6-rc -l {{ s6_live_dir }} -u -v 2 -t 15000 change rspamd
|
||||||
register: change
|
register: change
|
||||||
changed_when: change.stdout | length > 0
|
changed_when: change.stdout | length > 0
|
||||||
|
|
||||||
- name: Enable Rspamd
|
- name: Enable Rspamd
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/s6-rc/service/enabled/contents
|
path: '{{ s6_etc_dir }}/service/enabled/contents'
|
||||||
regexp: "^rspamd$"
|
regexp: "^rspamd$"
|
||||||
line: rspamd
|
line: rspamd
|
||||||
state: present
|
state: present
|
||||||
|
|
Loading…
Reference in New Issue