Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugins/action/system_certificate_export_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
ise_argument_spec,
)

# Get common arguements specification
# Get common arguments specification
argument_spec = ise_argument_spec()
# Add arguments specific for this module
argument_spec.update(dict(
export=dict(type="str"),
hostName=dict(type="str"),
id=dict(type="str"),
export=dict(type="str", choices=['CERTIFICATE', 'CERTIFICATE_WITH_PRIVATE_KEY']),
hostName=dict(type="str", required=True),
id=dict(type="str", required=True),
password=dict(type="str", no_log=True),
dirPath=dict(type="str"),
saveFile=dict(type="bool"),
Expand Down
37 changes: 36 additions & 1 deletion plugins/modules/system_certificate_export_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,31 @@
version_added: '1.0.0'
extends_documentation_fragment:
- cisco.ise.module_info
author: Rafael Campos (@racampos)
author:
- Rafael Campos (@racampos)
- Matthew Dennett (@matthewdennett)
options:
dirPath:
description: Directory absolute path. Defaults to the current working directory.
type: str
export:
description: System Certificate Export Info's export.
type: str
choices:
- CERTIFICATE
- CERTIFICATE_WITH_PRIVATE_KEY
filename:
description: The filename used to save the download file.
type: str
hostName:
description: Hostname of the Cisco ISE node in which self-signed certificate should
be generated.
type: str
required: true
id:
description: System Certificate Export Info's id.
type: str
required: true
password:
description: System Certificate Export Info's password.
type: str
Expand Down Expand Up @@ -68,6 +75,34 @@
password: string
saveFile: true

- name: Export Certificate
cisco.ise.system_certificate_export_info:
ise_hostname: "{{ise_hostname}}"
ise_username: "{{ise_username}}"
ise_password: "{{ise_password}}"
ise_verify: "{{ise_verify}}"
dirPath: /tmp/downloads/
export: CERTIFICATE
filename: certificate.zip
hostName: ise-node-001
id: "{{certificate_id}}"
password: "{{certificate_password}}"
saveFile: true

- name: Export Certificate and private key
cisco.ise.system_certificate_export_info:
ise_hostname: "{{ise_hostname}}"
ise_username: "{{ise_username}}"
ise_password: "{{ise_password}}"
ise_verify: "{{ise_verify}}"
dirPath: /tmp/downloads/
export: CERTIFICATE_WITH_PRIVATE_KEY
filename: certificate_and_key.zip
hostName: ise-node-001
id: "{{certificate_id}}"
password: "{{certificate_password}}"
saveFile: true

"""

RETURN = r"""
Expand Down