ansible-roles/tomcat-instance/tasks/systemd.yml

16 lines
464 B
YAML
Raw Normal View History

2017-01-03 12:41:19 +01:00
---
- name: Enable systemd user mode
ansible.builtin.command:
cmd: "loginctl enable-linger {{ tomcat_instance_name }}"
2023-03-16 14:35:12 +01:00
changed_when: False
2017-01-03 12:41:19 +01:00
- name: Set systemd conf var
ansible.builtin.lineinfile:
2017-01-03 12:41:19 +01:00
dest: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/.profile"
state: present
owner: "{{ tomcat_instance_name }}"
group: "{{ tomcat_instance_name }}"
mode: "0640"
2017-01-03 12:41:19 +01:00
create: yes
line: 'export XDG_RUNTIME_DIR=/run/user/$UID'