Skip to content
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

Merged
merged 9 commits into from
Dec 20, 2024

Conversation

unasra
Copy link
Collaborator

@unasra unasra commented Dec 2, 2024

No description provided.

plugins/modules/infra_join_token.py Show resolved Hide resolved
plugins/modules/infra_join_token.py Outdated Show resolved Hide resolved
@unasra unasra changed the title UI join token Support for Bloxone Ansible v2 Infra Join token Support for Bloxone Ansible v2 Dec 2, 2024
plugins/modules/infra_join_token.py Outdated Show resolved Hide resolved
plugins/modules/infra_join_token.py Outdated Show resolved Hide resolved
plugins/modules/infra_join_token.py Outdated Show resolved Hide resolved
plugins/modules/infra_join_token.py Outdated Show resolved Hide resolved
plugins/modules/infra_join_token.py Outdated Show resolved Hide resolved
plugins/modules/infra_join_token.py Outdated Show resolved Hide resolved
@unasra unasra requested a review from mathewab December 16, 2024 07:51
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()
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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

@mathewab mathewab merged commit 3256389 into infobloxopen:v2 Dec 20, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants