Skip to content

Commit 5e71b87

Browse files
Merge pull request #233 from RanabirChakraborty/systemd_fix
Fix systemd configuration when absolute logfile paths are used
2 parents a09fe56 + 2517f33 commit 5e71b87

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

molecule/mask_passwords/prepare.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
---
22
- name: Prepare
33
hosts: all
4-
vars:
5-
activemq_audit_log_absolute_path: "/var/log/amq/audit.log"
6-
activemq_main_log_absolute_path: "/var/log/amq/artemis.log"
74
tasks:
8-
- name: Ensure the audit log directory exists
9-
ansible.builtin.file:
10-
path: "{{ activemq_main_log_absolute_path }}"
11-
state: directory
12-
owner: root
13-
group: root
14-
mode: '0755'
15-
when: activemq_main_log_absolute_path | default('') | length > 0
16-
175
- name: "Run preparation common to all scenario"
186
ansible.builtin.include_tasks: ../prepare.yml

roles/activemq/tasks/systemd.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414
group: root
1515
mode: '0755'
1616

17-
- name: Ensure the audit log directory exists
18-
ansible.builtin.file:
19-
path: "{{ activemq_audit_log_absolute_path }}"
20-
state: directory
21-
owner: root
22-
group: root
23-
mode: '0755'
24-
become: "{{ activemq_install_requires_become | default(true) }}"
25-
when: activemq_audit_log_absolute_path | default('') | length > 0
26-
2717
- name: "Configure sysconfig file for {{ activemq.instance_name }} {{ activemq.service_name }} service"
2818
ansible.builtin.template:
2919
src: amq_broker.sysconfig.j2

roles/activemq/templates/amq_broker.service.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'wh
2828
{% endif %}
2929
{% if activemq_systemd_wait_for_log %}
3030
{% if activemq_ha_enabled %}
31-
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -F {{ activemq.instance_home }}/log/artemis.log | sed "/{{ activemq_systemd_wait_for_log_ha_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
31+
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -F {{ activemq_main_log_absolute_path | default(activemq.instance_home ~ "/log/artemis.log", true) }} | sed "/{{ activemq_systemd_wait_for_log_ha_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
3232
{% else %}
33-
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -F {{ activemq.instance_home }}/log/artemis.log | sed "/{{ activemq_systemd_wait_for_log_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
33+
ExecStartPost=/usr/bin/timeout {{ activemq_systemd_wait_for_timeout }} sh -c 'tail -n 15 -F {{ activemq_main_log_absolute_path | default(activemq.instance_home ~ "/log/artemis.log", true) }} | sed "/{{ activemq_systemd_wait_for_log_string }}/ q" && /bin/sleep {{ activemq_systemd_wait_for_delay }}'
3434
{% endif %}
3535
{% endif %}
3636

0 commit comments

Comments
 (0)