admin users: fix uidisbusy for proper rc check
because of "failed_when: False", the register would never fail so we check the return code of "getent passwd"
This commit is contained in:
parent
0115a16675
commit
7c92645c5c
|
@ -16,7 +16,7 @@
|
|||
shell: /bin/bash
|
||||
password: '{{ user.password_hash }}'
|
||||
update_password: on_create
|
||||
when: uidisbusy | failed
|
||||
when: uidisbusy.rc == 0
|
||||
|
||||
- name: "Add Unix account with random uid for '{{ user.name }}'"
|
||||
user:
|
||||
|
@ -26,7 +26,7 @@
|
|||
shell: /bin/bash
|
||||
password: '{{ user.password_hash }}'
|
||||
update_password: on_create
|
||||
when: uidisbusy | success
|
||||
when: uidisbusy.rc != 0
|
||||
|
||||
- name: "Fix perms on homedirectory for '{{ user.name }}'"
|
||||
file:
|
||||
|
|
Loading…
Reference in a new issue