Skip to content

Commit

Permalink
[ignore] remove empty line from example and combine present absent in…
Browse files Browse the repository at this point in the history
… conditional
  • Loading branch information
akinross authored and lhercot committed Oct 31, 2023
1 parent ddb5359 commit 0e1ab89
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions plugins/modules/aci_system_global_aes_passphrase_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
password: SomeSecretPassword
state: absent
delegate_to: localhost
"""

RETURN = r"""
Expand Down Expand Up @@ -221,26 +220,10 @@ def main():

aci.get_existing()

if state == "present":
aci.payload(
aci_class="pkiExportEncryptionKey",
class_config=dict(
passphrase=passphrase,
strongEncryptionEnabled=enable,
),
)

aci.get_diff(aci_class="pkiExportEncryptionKey")
if state in ["present", "absent"]:
class_config = dict(passphrase=passphrase, strongEncryptionEnabled=enable) if state == "present" else dict(clearEncryptionKey="yes")

aci.post_config()

elif state == "absent":
aci.payload(
aci_class="pkiExportEncryptionKey",
class_config=dict(
clearEncryptionKey="yes",
),
)
aci.payload(aci_class="pkiExportEncryptionKey", class_config=class_config)

aci.get_diff(aci_class="pkiExportEncryptionKey")

Expand Down

0 comments on commit 0e1ab89

Please sign in to comment.