execute systemd with user scope, remove linger

This commit is contained in:
flynn 2019-01-21 23:14:03 +01:00
parent 789e14466c
commit f127ba4bfd

View file

@ -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