aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/env
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-07-29 17:00:20 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-07-29 17:00:20 +0200
commitb232b894c3cbe087c8d504e91637dcf62199eed1 (patch)
treeea72a7d1a7f63c6425ee46785e1cec924351b2c3 /roles/_workstation/env
parent22126073344e60c405d086df37b64da0c6d3c086 (diff)
downloadinfrastructure-b232b894c3cbe087c8d504e91637dcf62199eed1.tar.gz
Bump to third revision of homelab
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.