Closed FSchwehla closed 2 years ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Hi @FSchwehla 👋
Thank you for the suggestion 👍, nice to see this ansible collection is used and yes, we should trigger an exception for this case :)
I would suggest an update on your PR. Instead of adding the resourcenotfound
variable and additional if / else nightmare, maybe could we just replace on line 294:
ret.append(self._format_result(dict(), dict()))
With:
raise Exception("resource {} not found".format(terms[0]))
What do you think? Can you update your PR with only this change?
Best regards,
Cool! thank you for your contribution! Don't hesitate if you have other optimizations or questions 😃
I will create a new release soon with your change.
Hi @AnatomicJC,
my pleasure and thank you for the incredibly fast response! 👍
Best Regards
@FSchwehla I just pushed the new release with your merged PR to https://galaxy.ansible.com/anatomicjc/passbolt
Have a nice day / weekend
To prevent that an empty password will be provided by the ansible lookup, I added an exception so that in case that the resource is not available and the create_new_resource parameter is set to false, the lookup will throw an error.