Closed nalokin closed 5 years ago
Adding expired
as on option shouldn't be a problem
If the user doesn't exist could just exit with a message to that effect.
Fantastic. Will test out and update.
Great. Works as expected. When state unlocked and user does not exists it throws an error. When user is expired it creates the user as expired.
I would suggest documentation update with new status.
state:
description:
- Whether the user should exist.
- Absent removes the user, locked/unlocked locks or unlocks the user, expire, expires the user.
- If user does not exists and state is 'unlocked' it will throw an error "The schema schema1 doesn't exist"
required: False
default: present
choices: ['present','absent','locked','unlocked','expire']
Or if you want I can pull the code and update it. I just thought this is easier\quicker.
Thanks. -N.
Hi,
as per documentation state parameter is:
If we pass parameter locked or unlocked and user is not present user will be created. This would mean that 'unlocked' is redundant as it has the same function as 'present'. Does it make sense to throw an error when user doesn't exist.
For example let's say we would like to automate that users can unlock themselves without admins have to log in and do it for them. If we use that parameter users would get instantaneous access to the DB without ever been granted one.
Also to the same point should there be 'expired' option in there so that user gets created as expired and is forced to change password on the next login.
Thank you. n.