From b232b894c3cbe087c8d504e91637dcf62199eed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 29 Jul 2021 17:00:20 +0200 Subject: Bump to third revision of homelab --- roles/_workstation/env/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/_workstation/env') diff --git a/roles/_workstation/env/tasks/main.yml b/roles/_workstation/env/tasks/main.yml index 261170e..ff9acd2 100644 --- a/roles/_workstation/env/tasks/main.yml +++ b/roles/_workstation/env/tasks/main.yml @@ -12,6 +12,13 @@ shell: cat /etc/passwd | cut -d ":" -f 1 register: result +- name: retrieve current user + shell: whoami + register: result_ + +- set_fact: + _ws_user: "{{ result_.stdout_lines[0] }}" + - name: check if target user exists fail: msg: _ws_user is not a valid user -- cgit v1.2.3