From efe72d2582b654d36798de19891c044a90ce0ffd Mon Sep 17 00:00:00 2001 From: lhahn Date: Sun, 28 Jul 2024 23:25:18 +0200 Subject: [PATCH] optimize grep --- tasks/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/users.yml b/tasks/users.yml index 85c776d..667aec4 100755 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -1,6 +1,6 @@ --- - name: list active users - shell: cat /etc/passwd | grep -v "nologin" | cut -f 1 -d ":" + shell: grep -v "nologin" /etc/passwd | cut -f 1 -d ":" changed_when: false register: active_users