mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 01:44:03 -07:00
* Update for #54298: Certificate is abstract, so instantiating doesn't work. * Add test for removal.
This commit is contained in:
parent
df86b9ec3d
commit
5bb5c9d295
3 changed files with 60 additions and 2 deletions
|
@ -691,6 +691,14 @@ class Certificate(crypto_utils.OpenSSLObject):
|
|||
|
||||
return True
|
||||
|
||||
|
||||
class CertificateAbsent(Certificate):
|
||||
def __init__(self, module):
|
||||
super(CertificateAbsent, self).__init__(module, 'cryptography') # backend doesn't matter
|
||||
|
||||
def generate(self, module):
|
||||
pass
|
||||
|
||||
def dump(self, check_mode=False):
|
||||
# Use only for absent
|
||||
|
||||
|
@ -1684,8 +1692,7 @@ def main():
|
|||
)
|
||||
|
||||
if module.params['state'] == 'absent':
|
||||
# backend doesn't matter
|
||||
certificate = Certificate(module, 'cryptography')
|
||||
certificate = CertificateAbsent(module)
|
||||
|
||||
else:
|
||||
if module.params['provider'] != 'assertonly' and module.params['csr_path'] is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue