fix: Remove the empty contents of the log

pull/14996/head
wangruidong 2025-03-11 16:39:08 +08:00
parent 8668955d4a
commit 43973122bf
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@
- name: Gather posix account last login
ansible.builtin.shell: |
for user in {{ users.stdout_lines | join(" ") }}; do
last -i --time-format iso -n 1 ${user} | awk '{ print $1,$3,$4, $NF }' | head -1 | grep -v ^$
last -i --time-format iso -n 1 ${user} | awk '{ print $1,$3,$4, $NF }' | head -1 | awk 'NF'
done
register: last_login