execute systemd with user scope, remove linger
This commit is contained in:
parent
789e14466c
commit
f127ba4bfd
1 changed files with 7 additions and 4 deletions
|
@ -92,13 +92,16 @@
|
||||||
owner: cat
|
owner: cat
|
||||||
group: cat
|
group: cat
|
||||||
|
|
||||||
- name: Make the user service execute on system start instead of user login
|
#- name: Make the user service execute on system start instead of user login
|
||||||
become: yes
|
# become: yes
|
||||||
become_user: root
|
# become_user: root
|
||||||
shell: loginctl enable-linger {{ cat_user }}
|
# shell: loginctl enable-linger {{ cat_user }}
|
||||||
|
|
||||||
- name: Enable cat service
|
- name: Enable cat service
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ cat_user }}"
|
||||||
systemd:
|
systemd:
|
||||||
|
scope: user
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
name: cat
|
name: cat
|
||||||
|
|
Loading…
Reference in a new issue