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
|
||||
group: cat
|
||||
|
||||
- name: Make the user service execute on system start instead of user login
|
||||
become: yes
|
||||
become_user: root
|
||||
shell: loginctl enable-linger {{ cat_user }}
|
||||
#- name: Make the user service execute on system start instead of user login
|
||||
# become: yes
|
||||
# become_user: root
|
||||
# shell: loginctl enable-linger {{ cat_user }}
|
||||
|
||||
- name: Enable cat service
|
||||
become: yes
|
||||
become_user: "{{ cat_user }}"
|
||||
systemd:
|
||||
scope: user
|
||||
enabled: yes
|
||||
state: started
|
||||
name: cat
|
||||
|
|
Loading…
Reference in a new issue