From 8ca995d71584ba20552fc7f2254647594a5c5ca1 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 29 Jul 2022 17:59:15 +0100 Subject: [PATCH] Implement system-info role on Debian --- roles/system-info/tasks/Debian.yaml | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/roles/system-info/tasks/Debian.yaml b/roles/system-info/tasks/Debian.yaml index db2188a..3da4ccc 100644 --- a/roles/system-info/tasks/Debian.yaml +++ b/roles/system-info/tasks/Debian.yaml @@ -1,5 +1,28 @@ --- -# TODO: -# cp $script_dir/system-info.service ~/.config/systemd/user/system-info.service -# systemctl --user enable system-info -# systemctl --user start system-info +- name: install apt packages + become: true + apt: + name: + - gawk + - sysstat + state: latest + +- name: create systemd user unit directory + when: ansible_os_family != "Darwin" + file: + state: directory + dest: ~/.config/systemd/user + +- name: install system-info systemd unit + when: ansible_os_family != "Darwin" + copy: + src: ~/.config/tmux/system-info/system-info.service + dest: ~/.config/systemd/user/system-info.service + +- name: enable system-info service + when: ansible_os_family != "Darwin" + systemd: + name: system-info + scope: user + enabled: true + state: started