-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
ssh passphrase not working in rundeck ansible resource module it is working in Node Executor using SSH
- i have created a project using ansible resource model . i have added ssh-key and passphrase for that key in key-storage, when i tried to scan nodes by passing ansible inventory iam getting below error
Getting Below error
PLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
fatal: [qa-live.corp]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: dev.ops@qa-live.corp: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", "unreachable": true}
It is working from cli
rundeck@5c4c23700c44:~/projects/gra-ops/inventories/local$ ansible all-m ping -i qa.yaml -u dev.ops --private-key=devops.pem
Enter passphrase for key '/home/rundeck/projects/gra-ops/inventories/local/devops.pem':
qa-live.corp | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
Rundeck version : 5.3.0
Ansible Version : 2.16.8
My Observations :
It seems that the issue may be related to the handling of the SSH key passphrase. Here are the key observations:
- Passphrase Prompt in CLI: When running the Ansible command from the CLI, it prompts for the SSH key passphrase. Once the passphrase is entered and stored in the session, the node becomes visible in the Rundeck UI.
- Node Disappears After Some Time: After some time, the node disappears from the Rundeck UI.
- Passphrase Required Again: When checking again via the CLI, it prompts for the passphrase once more, indicating that the passphrase needs to be re-entered to establish the connection.
Summary
The root cause seems to be the handling and persistence of the SSH key passphrase. When the passphrase is entered and stored in the CLI session, the node becomes accessible. However, once the session expires or is reset, the passphrase needs to be re-entered for the node to be accessible again.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels