Closed demossiah closed 5 years ago
Please open a feature request issue at https://github.com/ansible/ansible/issues/new?template=feature_request.md
This project is used for larger feature discussions that impact the way that ansible operates as opposed to feature requests for individual modules.
Proposal:
Author: Rick Tijssen <@demossiah>
Date: 2018-09-24
Motivation
At this time you have to use 4 tasks to complete all requirements of the acme_certificate task.
When going over a loop you also have to add another task to gather the challenge_data. And if you want to clean up the used challenges another task has to be executed.
This process results in a lot of extra "code" which could be solved in the plugin acme_certificate itself by adding extra parameter for a challenge placement directory. Which when supplied would place the challenge in the directory, and request a validation from the acme server.
Problems
It wouldn't solve a problem, but it would improve readability for an already complex set of tasks.
Solution proposal
By adding an extra parameter where the challenges should be stored e.g. "challenge_directory" (string). When this parameter has a value the plugin will do all the required steps to get the challenge into the directory. And send a verification request to the acme server. This should not impact current implementations because this wouldn't be a required parameter. To expand on this functionality an additional parameter could also be used e.g. "keep_challenge" (bool). Which would not remove the challenge files, whether it should default to true or false is up to you. As with the previous parameter it should not impact current implementations because it would only affect files placed with the first parameter specified.