Skip to content

Commit

Permalink
Add changed_when line for awk command to allow for idempotency when n…
Browse files Browse the repository at this point in the history
…o results are found.
  • Loading branch information
nmoyer-spectric committed Jul 12, 2024
1 parent 34011f7 commit ed2814b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
command: >
awk -F: '!$2 {print $1}' /etc/shadow
register: users_nopasswd
changed_when: users_nopasswd.stdout_lines | length > 0

- name: Lock users with no password
command: >
Expand Down

0 comments on commit ed2814b

Please sign in to comment.