Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Do not require password when deleting os_user #5601

Merged
merged 1 commit into from Nov 16, 2016

Conversation

omgjlk
Copy link
Contributor

@omgjlk omgjlk commented Nov 14, 2016

  • Bugfix Pull Request

os_user

devel

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.

@@ -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 "
Copy link

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?

Copy link
Contributor Author

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.

@gregdek
Copy link
Contributor

gregdek commented Nov 14, 2016

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.]

@omgjlk
Copy link
Contributor Author

omgjlk commented Nov 15, 2016

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.
@Thingee
Copy link

Thingee commented Nov 15, 2016

Tested, looks good to me!

@Shrews Shrews merged commit bb97885 into ansible:devel Nov 16, 2016
dagwieers pushed a commit to dagwieers/ansible-modules-core that referenced this pull request Nov 18, 2016
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.
sbussetti pushed a commit to sbussetti/ansible-modules-core that referenced this pull request Nov 21, 2016
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants