I’ve added the public key in the remote node where the installation has to be done. The SSH private key value is added in gitlab as variable file, runner is setup, even though getting this error:
<ansible@[MASKED]> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/gitlab-runner/builds/ZSxgtfmp/0/riyaz/ansible.tmp/SSH_PRIVATE_KEY"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o 'ControlPath="/home/gitlab-runner/.ansible/cp/f7c4351094"' ansible@[MASKED] '/bin/sh -c '"'"'echo ~ansible && sleep 0'"'"''
<ansible@[MASKED]> (255, b'', b'Load key "/home/gitlab-runner/builds/ZSxgtfmp/0/riyaz/ansible.tmp/SSH_PRIVATE_KEY": error in libcryptornansible@[MASKED]: Permission denied (publickey,password).rn')
fatal: [ansible@[MASKED]]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Load key "/home/gitlab-runner/builds/ZSxgtfmp/0/riyaz/ansible.tmp/SSH_PRIVATE_KEY": error in libcryptornansible@[MASKED]: Permission denied (publickey,password).",
"unreachable": true
}
PLAY RECAP *********************************************************************
ansible@[MASKED] : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
Kindly guide me where things are going wrong and whats the solution for this connection error.
for reference the inventory.ini file is:
ansible@masked_ip_address
New contributor
Riyaz Azam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2