Error when using the module cisco.ise.system_certificate_export
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2024 10:20 AM
I am using the cisco.ise.system_certificate_exportmodule in ansible to export the certificates , but I am getting the following error :
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 10: invalid start byte
fatal: [localhost]: FAILED! => {"msg": "Unexpected failure during module execution: 'utf-8' codec can't decode byte 0x9a in position 10: invalid start byte", "stdout": ""}
this are the version I am using : ansible [core 2.18.0] , cisco.ise 2.9.5 , ciscoisesdk 2.2.3
This is the task i am using :
- name: Export certificate
cisco.ise.system_certificate_export_info:
ise_hostname: "{{ ise_host }}"
ise_username: "{{ ise_username }}"
ise_password: "{{ ise_password }}"
ise_verify: no
dirPath: "/corp/apps/network_ansible/backups/cisco_ise"
export: "CERTIFICATE_WITH_PRIVATE_KEY"
filename: "{{ ise_cert_name }}"
hostName: "{{ ise_host }}"
id: "{{ cert_id }}"
password: "{{ ise_cert_export_pass }}"
saveFile: true
Any thoughts about why is not working ?
- Labels:
-
Code and Deployment

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 02:57 AM
@INGJONATAN82 it would appear from your error, the module is trying to decode a byte sequence that is not valid UTF-8, youget this error if the data being processed contains binary data or that its encoded in a different character set.
Make sure that the certificate data is being returned correctly and that its in a format that can be decoded as UTF-8, you might want to inspect the raw response from the API call.
Hope this helps.
Connect with me https://bigevilbeard.github.io
