File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -946,10 +946,15 @@ run_ansible() {
946946 # Create the collections directory if it doesn't exist
947947 mkdir -p " $ansible_collections_path "
948948
949+ # Create the known_hosts file if it doesn't exist
950+ if [[ ! -f " $HOME /.ssh/known_hosts" ]]; then
951+ touch " $HOME /.ssh/known_hosts"
952+ fi
953+
949954 while [[ " $# " -gt 0 ]]; do
950955 case " $1 " in
951956 --allow-ssh)
952- additional_docker_args+=(" -v" " $HOME /.ssh/:/ssh/" " -v" " $ansible_collections_path :/etc/ansible/collections" )
957+ additional_docker_args+=(" -v" " $HOME /.ssh/:/ssh/:ro " " -v " " $HOME /.ssh/known_hosts:/ssh/known_hosts:rw " " -v" " $ansible_collections_path :/etc/ansible/collections" )
953958 # Mount the SSH Agent for macOS and Linux (including WSL2) systems
954959 if [ -n " $SSH_AUTH_SOCK " ]; then
955960 case " $( uname -s) " in
You can’t perform that action at this time.
0 commit comments