aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/env
diff options
context:
space:
mode:
Diffstat (limited to 'roles/_workstation/env')
-rw-r--r--roles/_workstation/env/tasks/main.yml7
1 files changed, 7 insertions, 0 deletions
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
remember that computers suck.