From 7d118f1193f342f656e8e6f21e2300dbc9a0bd38 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Thu, 25 Jan 2024 09:48:55 +0100 Subject: [PATCH] on-off: remove drone-user (#645) Reviewed-on: https://git.mgrote.net/mg/homeserver/pulls/645 Co-authored-by: Michael Grote Co-committed-by: Michael Grote --- playbooks/on-off/remove_drone-user.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 playbooks/on-off/remove_drone-user.yml diff --git a/playbooks/on-off/remove_drone-user.yml b/playbooks/on-off/remove_drone-user.yml new file mode 100644 index 00000000..198bbd06 --- /dev/null +++ b/playbooks/on-off/remove_drone-user.yml @@ -0,0 +1,18 @@ +--- +- hosts: all + tasks: + - name: remove user + become: true + ansible.builtin.user: + name: "{{ item }}" + state: absent + remove: true + loop: + - drone + - drone-user + + - name: Ensure dir is removed + become: true + ansible.builtin.file: + path: /home/drone + state: absent