- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
09-29-2025 11:08 PM
Hi All,
Am trying to write Ansible Query for CCP to fetch SSH key from CyberArk.
When I try normally like below its works,
https://cyberark-ccp.com/AIMWebService/api/Accounts?AppID=Elastic-Stack&Safe=CY-SVR-LNX-LOC-MTP-GLP&...” -O ssh.key
But When I try to run with Ansible it fails with 404.
Can anyone help me with ansible query to get ssh key from CCP. I refer cyberark.pas.cyberark_credential module – Credential retrieval using AAM Central Credential Provider... but this is failing with 404.
Thanks,
Subash
09-30-2025 02:12 AM
Hi @Subash Jesuraj
The issue seems to that the Ansible module
cyberark.pas.cyberark_credential
formats the URL query differently than a manual browser or wget request.
Try this in Ansible YAML file.
- name: Retrieve SSH Private Key from CyberArk CCP
cyberark.pas.cyberark_credential:
api_base_url: "https://cyberark-ccp.com"
app_id: "Elastic-Stack"
query: "Safe=CY-SVR-LNX-LOC-MTP-GLP;Folder=Root;Object=OperatingSystem-CY-Unix-via-SSH-Keys-accountname-elastic_install"
output: "Password"
Hope it helps !
09-30-2025 02:12 AM
Hi @Subash Jesuraj
The issue seems to that the Ansible module
cyberark.pas.cyberark_credential
formats the URL query differently than a manual browser or wget request.
Try this in Ansible YAML file.
- name: Retrieve SSH Private Key from CyberArk CCP
cyberark.pas.cyberark_credential:
api_base_url: "https://cyberark-ccp.com"
app_id: "Elastic-Stack"
query: "Safe=CY-SVR-LNX-LOC-MTP-GLP;Folder=Root;Object=OperatingSystem-CY-Unix-via-SSH-Keys-accountname-elastic_install"
output: "Password"
Hope it helps !
10-01-2025 05:40 AM
This Works @Malhar Vora
Thank you
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

