autostart: Template the autostart target unit file
This commit is contained in:
@@ -7,7 +7,9 @@ Wants=discord.service
|
|||||||
Wants=dpms.service
|
Wants=dpms.service
|
||||||
Wants=dunst.service
|
Wants=dunst.service
|
||||||
Wants=element.service
|
Wants=element.service
|
||||||
Wants=firefox.service
|
{% for profile in user.firefox_profiles|default([]) %}
|
||||||
|
Wants=firefox@{{ profile.name }}.service
|
||||||
|
{% endfor %}
|
||||||
Wants=gpg-agent.service
|
Wants=gpg-agent.service
|
||||||
Wants=gnome-keyring.service
|
Wants=gnome-keyring.service
|
||||||
Wants=keepassx.service
|
Wants=keepassx.service
|
||||||
22
user.yml
22
user.yml
@@ -478,5 +478,27 @@
|
|||||||
group: "{{ user_group_name }}"
|
group: "{{ user_group_name }}"
|
||||||
with_fileglob: /var/lib/dotfiles/autostart/services/*
|
with_fileglob: /var/lib/dotfiles/autostart/services/*
|
||||||
|
|
||||||
|
- name: get state of autostart.target
|
||||||
|
stat:
|
||||||
|
path: "/home/{{ user.name }}/.config/systemd/user/autostart.target"
|
||||||
|
register: autostart_target_stat
|
||||||
|
|
||||||
|
- name: remove invalid autostart.target
|
||||||
|
file:
|
||||||
|
path: "/home/{{ user.name }}/.config/systemd/user/autostart.target"
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- autostart_target_stat.stat.exists
|
||||||
|
- not autostart_target_stat.stat.isreg
|
||||||
|
|
||||||
|
- name: deploy autostart.target
|
||||||
|
template:
|
||||||
|
src: ./autostart/autostart.target.j2
|
||||||
|
dest: "/home/{{ user.name }}/.config/systemd/user/autostart.target"
|
||||||
|
owner: "{{ user.name }}"
|
||||||
|
group: "{{ user_group_name }}"
|
||||||
|
force: true
|
||||||
|
follow: false
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- autostart
|
- autostart
|
||||||
|
|||||||
Reference in New Issue
Block a user