jmal98 / ansiblecm

A Docker based Ansible control machine for running playbooks in a consistent environment.
Apache License 2.0
42 stars 24 forks source link

ansible host ignoring ansible.cfg source at /tmp/playbook #17

Open arieluchka opened 1 year ago

arieluchka commented 1 year ago

hi, when i run the command you provided: docker run -it --rm --entrypoint ansible -v $PWD/demo/playbook:/tmp/playbook:Z jmal98/ansiblecm:7.4.0 web -m yum -a 'name=java-1.8.0-openjdk-headless state=present' -i inventory/hosts -u centos -k -b i get a message "[WARNING]: Ansible is being run in a world writable directory (/tmp/playbook), ignoring it as an ansible.cfg source. For more information see https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir"

where right after that: "web1 | FAILED! => { "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host." } web2 | FAILED! => { "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host." } web3 | FAILED! => { "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host.""

im new to ansible and didnt find a way to let it accept the ansible.cfg in the repository :(

jmal98 commented 6 months ago

hi,

It appears that your copy of the demo directory, specifically demo/playbook/ansible.cfg is different than what is in this project's repo. That is causing the issue you are experiencing.