-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infra Join token Support for Bloxone Ansible v2 #47
Conversation
plugins/modules/infra_join_token.py
Outdated
result["changed"] = True | ||
result["msg"] = "JoinToken Revoked" | ||
elif self.params["state"] == "revoked" and self.existing is not None and self.existing.status == "REVOKED": | ||
self.delete() |
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.
do you have to call delete again if it is already revoked?
Also, it will be interesting to see how the module behaves when a task is made to revoke a token that does not exist.
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.
No , delete call removed there.
When tried to delete a token that has never been created , the filter fails as it cant find the token and the task passes as no action is otherwise performed.
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.
Ok. I also wonder what is the value of "changed". Based on the code, I feel that we don't set it in that scenario, but it might be the case with other modules as well when we try to do an "absent" task for a non existing resource.
However in this case, I also wonder if "revoked" task should throw an error if not found, since it is not equivalent to "absent".
No description provided.