You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use ansible.scm in an AAP Execution Environment to retrieve a git repository via SSH. When calling git_retrieve the execution stops, asking what to do about the new unknown hostkey. Afterwards the execution is aborted due to a timeout waiting for a console input.
I tried adding 'host_key_checking: "no"' to the task, but this did not change anything. I guess git_publish will have the same problem.
The expectation is, that the given git repo is checked out into a temporary directory inside the execution environment accepting/ignoring the unknown host key. The same way as the "accept_hostkey: true" option of ansible.builtin.git is working.
ACTUAL RESULTS
The execution got stuck at the ssh prompt asking wether to accept the unknown host key. Finally running into a timeout as no answer is given.
Although not tested, I assume git_publish will have the same problem.
Enter passphrase for /runner/artifacts/707585/ssh_key_data:
Identity added: /runner/artifacts/707585/ssh_key_data (/runner/artifacts/707585/ssh_key_data)
PLAY [ansible.scm tests] *******************************************************
TASK [Retrieve Task] **************************************************************
The authenticity of host '[githost]:PORT ([IP ADDRESSE]:PORT)' can't be established.
RSA key fingerprint is SHA256:FINGERPRINT_REMOVED.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
fatal: [localhost]: FAILED! => {"branch_name": "", "branches": [], "changed": true, "msg": "Timeout: Failed to clone repository: ssh://git@githost:PORT/projectname/reponame.git", "name": "", "output": [{"command": "git -C /tmp/tmpunfrecz9 clone --depth=1 --progress --no-single-branch ssh://git@githost:PORT/projectname/reponame.git", "env": "", "return_code": 62, "stderr_lines": ["Cloning into 'reponame'..."], "stdout_lines": []}], "path": ""}
PLAY RECAP *********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
My main reason I am trying to use ansible.scm is the git_publish functionality.
As a workaround I could use a dummy ansible.builtin.git with the "accept_hostkey: true" option, to add the git server's fingerprint to the ~/.ssh/known_hosts file in the EE, and afterwards use ansible.scm.*
The text was updated successfully, but these errors were encountered:
SUMMARY
I am trying to use ansible.scm in an AAP Execution Environment to retrieve a git repository via SSH. When calling git_retrieve the execution stops, asking what to do about the new unknown hostkey. Afterwards the execution is aborted due to a timeout waiting for a console input.
I tried adding 'host_key_checking: "no"' to the task, but this did not change anything. I guess git_publish will have the same problem.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ansible Automation Platform Controller 4.3.8
The execution environment uses "Red Hat Enterprise Linux release 8.8 (Ootpa)"
STEPS TO REPRODUCE
Launch a Job Template in an execution environment which does not have any SSH known_hosts file.
EXPECTED RESULTS
The expectation is, that the given git repo is checked out into a temporary directory inside the execution environment accepting/ignoring the unknown host key. The same way as the "accept_hostkey: true" option of ansible.builtin.git is working.
ACTUAL RESULTS
The execution got stuck at the ssh prompt asking wether to accept the unknown host key. Finally running into a timeout as no answer is given.
Although not tested, I assume git_publish will have the same problem.
My main reason I am trying to use ansible.scm is the git_publish functionality.
As a workaround I could use a dummy ansible.builtin.git with the "accept_hostkey: true" option, to add the git server's fingerprint to the ~/.ssh/known_hosts file in the EE, and afterwards use ansible.scm.*
The text was updated successfully, but these errors were encountered: