Switch system-info to systemd on WSL

This commit is contained in:
2023-05-12 22:20:05 +01:00
parent 8fae111d0e
commit d4393851b1
4 changed files with 53 additions and 26 deletions

View File

@@ -12,10 +12,21 @@
state: directory
dest: ~/.config/systemd/user
- set_fact:
SYSTEM_INFO_SCRIPT_DIR: '{{ansible_env.HOME}}/.config/tmux/system-info'
- when: '"WSL" not in ansible_kernel'
set_fact:
SYSTEM_INFO_SCRIPT: '{{SYSTEM_INFO_SCRIPT_DIR}}/system-info-Linux.sh'
- when: '"WSL" in ansible_kernel'
set_fact:
SYSTEM_INFO_SCRIPT: '{{SYSTEM_INFO_SCRIPT_DIR}}/system-info-WSL.sh'
- name: install system-info systemd unit
copy:
src: ~/.config/tmux/system-info/system-info.service
template:
src: templates/system-info.service.j2
dest: ~/.config/systemd/user/system-info.service
notify: restart system-info
- name: enable system-info service
systemd: