Skip to content

Added the 'ssh_args = -F /dev/null' line to the Ansible configuration.

Vitaliy Kukharik requested to merge ssh-args into main

This Merge Request introduces a change to the Ansible configuration by adding 'ssh_args = -F /dev/null'. This addition forces SSH to ignore its configuration file when Ansible connects to the hosts.

The need for this change arose from a compatibility issue we encountered. When Ansible, run within a Docker container, read the host machine's mounted SSH config, it resulted in SSH errors due to unrecognized macOS specific options (like 'usekeychain') within the Linux environment of the Docker container.

This update enhances our Ansible playbooks' compatibility across different environments by preventing potential SSH errors caused by host-specific SSH configurations.

Fixed:

docker run --rm -it -v $HOME/.ssh:/root/.ssh:ro postgresai/dle-se-ansible:v1.0-rc.3 \ 
  ansible-playbook deploy_dle.yml --extra-vars \
    "dle_host='root@5.78.111.74' \
    dle_platform_project_name='vitaliy-dle-test' \
    dle_version='3.4.0-rc.6' \
    dle_platform_org_key='******' \
    dle_verification_token='*********'"

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
[WARNING]: Unable to parse /dle-se-ansible/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Perform pre-checks] **************************************************************************************************************************************************************************************

PLAY [Provision of cloud resources (virtual machine + disk) for DLE (on NONE)] *********************************************************************************************************************************

PLAY [Add host to dle_group] ***********************************************************************************************************************************************************************************

TASK [Add root@5.78.111.74 to dle_group] ***********************************************************************************************************************************************************************
ok: [localhost]

PLAY [Set facts for dle_group] *********************************************************************************************************************************************************************************

PLAY [Deploy DLE] **********************************************************************************************************************************************************************************************
[WARNING]: Unhandled error in Python interpreter discovery for host root@5.78.111.74: Failed to connect to the host via ssh: /root/.ssh/config: line 7: Bad configuration option: usekeychain
/root/.ssh/config: terminating, 1 bad configuration options

TASK [Gathering Facts] *****************************************************************************************************************************************************************************************
fatal: [root@5.78.111.74]: UNREACHABLE! => {"changed": false, "msg": "Data could not be sent to remote host \"root@5.78.111.74\". Make sure this host can be reached over ssh: /root/.ssh/config: line 7: Bad configuration option: usekeychain\r\n/root/.ssh/config: terminating, 1 bad configuration options\r\n", "unreachable": true}

NO MORE HOSTS LEFT *********************************************************************************************************************************************************************************************

PLAY RECAP *****************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=96   rescued=0    ignored=0   
root@5.78.111.74           : ok=0    changed=0    unreachable=1    failed=0    skipped=1    rescued=0    ignored=0   

Merge request reports