Skip to content

Commit

Permalink
Revert "Remove Entrust provider from x509_certificate_pipe for now."
Browse files Browse the repository at this point in the history
This reverts commit 6ee5d7d.
  • Loading branch information
felixfontein committed Nov 12, 2020
1 parent ec8221d commit 01bbf93
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions plugins/modules/x509_certificate_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
short_description: Generate and/or check OpenSSL certificates
version_added: 1.3.0
description:
- It implements a notion of provider (ie. C(selfsigned), C(ownca))
- It implements a notion of provider (ie. C(selfsigned), C(ownca), C(entrust))
for your certificate.
- "Please note that the module regenerates existing certificate if it doesn't match the module's
options, or if it seems to be corrupt. If you are concerned that this could overwrite
Expand All @@ -29,8 +29,10 @@
provider:
description:
- Name of the provider to use to generate/retrieve the OpenSSL certificate.
- "The C(entrust) provider requires credentials for the
L(Entrust Certificate Services,https://www.entrustdatacard.com/products/categories/ssl-certificates) (ECS) API."
type: str
choices: [ ownca, selfsigned ]
choices: [ entrust, ownca, selfsigned ]
required: true
content:
Expand All @@ -43,6 +45,7 @@
extends_documentation_fragment:
- community.crypto.module_certificate
- community.crypto.module_certificate.backend_entrust_documentation
- community.crypto.module_certificate.backend_ownca_documentation
- community.crypto.module_certificate.backend_selfsigned_documentation
'''
Expand Down Expand Up @@ -90,6 +93,11 @@
get_certificate_argument_spec,
)

from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_entrust import (
EntrustCertificateProvider,
add_entrust_provider_to_argument_spec,
)

from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_ownca import (
OwnCACertificateProvider,
add_ownca_provider_to_argument_spec,
Expand Down Expand Up @@ -131,6 +139,7 @@ def dump(self, check_mode=False):
def main():
argument_spec = get_certificate_argument_spec()
argument_spec.argument_spec['provider']['required'] = True
add_entrust_provider_to_argument_spec(argument_spec)
add_ownca_provider_to_argument_spec(argument_spec)
add_selfsigned_provider_to_argument_spec(argument_spec)
argument_spec.argument_spec.update(dict(
Expand All @@ -143,6 +152,7 @@ def main():
try:
provider = module.params['provider']
provider_map = {
'entrust': EntrustCertificateProvider,
'ownca': OwnCACertificateProvider,
'selfsigned': SelfSignedCertificateProvider,
}
Expand Down

0 comments on commit 01bbf93

Please sign in to comment.