In purefa_token, main doesn't pull in the module defautls
Describe the bug The purefa_token module main() should grab purefa_argument_spec() and the update() the spec with module parameters, but it does not. This causes what looks like a cert error, but is actually a keyerror about disable_warnings. disable_warnings is defined in purefa_argument_spec globally.
To Reproduce Steps to reproduce the behavior: Use 1.29.0 or greater of the collection and try to run the purefa_token module.
Expected behavior Expect the token operation to succeed.
Additional context Will submit PR.
@lotaris-xx I'm not sure doing what you suggest will work. Thi smodukle is effectively a standalone module that was only added reluctantly.
What appears to have happened is that when we added disable_warnings to the main util module, we forgot to add it to this module.
We'll get it fixed .
The correct method for resolving this should be in #615 Please check this to see it it works
Whacky. Every other module uses the method in 614 for this property.
I did fix the linting and import error in #615, so it will hopefully pass pipelines now.
That is because this module is slighlty different to the other modules. It is primarily used to create an API token for a user when only the password is known and therefore we have to use an old authentication method. In fact we originally didn't even publish this module, because only wanted to authenticate with tokens and not passwords, but we were 'forced to' by a large customer...
That makes sense. We use central auth on all of our arrays and for each ansible job we first create a 1day token and use that for the rest of the job and then delete the token at the end of the job. Keeps us from having to have a list of tokens vaulted somewhere that we have to then manage/rotate regularly. Interested to hear what the recommended workflow would be for automation across a large # of arrays, probably a good conversation for another forum.
@lotaris-xx does this patch resolve your issue? We are going to release a new collection soon and want to add this fix into it, assuming it works for you
I can let you know by EOD tomorrow. Thanks, -Allen
Our test session has slipped to Monday, so we will update then.
Works great. Thanks!