Do not require password when deleting os_user #5601
Conversation
@@ -219,6 +215,10 @@ def main(): | |||
domain_id = _get_domain_id(opcloud, domain) | |||
|
|||
if state == 'present': | |||
if update_password in ('always', 'on_create'): | |||
if not password: | |||
msg = ("update_password is %s but a password value is " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does msg actually get used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, good catch, I was a bit too hurried this morning. I intended to use it in a fail_json
call, which I have just done with a newer change set.
7425401
to
4ed91e0
Compare
Thanks @j2sol for this PR. This PR requires revisions, either because it fails to build or by reviewer request. Please make the suggested revisions. When you are done, please comment with text 'ready_for_review' and we will put this PR back into review. [This message brought to you by your friendly Ansibull-bot.] |
This build failure is due to a module outside of this PR. |
I broke backwards compat with the addition to define when a password should be updated. It was requiring that a password value be passed when deleting a user, which seems silly. This moves the argument logic out of the argument spec and into when it would be needed, when state is present.
4ed91e0
to
fe2cd56
Compare
Tested, looks good to me! |
I broke backwards compat with the addition to define when a password should be updated. It was requiring that a password value be passed when deleting a user, which seems silly. This moves the argument logic out of the argument spec and into when it would be needed, when state is present.
I broke backwards compat with the addition to define when a password should be updated. It was requiring that a password value be passed when deleting a user, which seems silly. This moves the argument logic out of the argument spec and into when it would be needed, when state is present.
os_user
I broke backwards compat with the addition to define when a password
should be updated. It was requiring that a password value be passed when
deleting a user, which seems silly.
This moves the argument logic out of the argument spec and into when it
would be needed, when state is present.