fix(user): ignore ssh key errors in check mode

In check mode, the task fails if it's supposed to be adding ssh keys to
a user who doesn't exist. Ignoring errors in check mode makes it
possible to run the task in check mode even if there are new users to be
added.
This commit is contained in:
Sammy 2024-02-02 10:34:16 +01:00
parent 0e98261665
commit 4d1fae6b77
No known key found for this signature in database
GPG key ID: C99355AC01BC7575

View file

@ -25,3 +25,4 @@
exclusive: true exclusive: true
become: true become: true
when: "user.attrs.active | default(false)" when: "user.attrs.active | default(false)"
ignore_errors: "{{ ansible_check_mode }}"