Open xphsc opened 10 months ago
Unfortunately, I don't have enough context to understand why this doesn't work. Can you let me know what commands you are running and how you are mounting the docker container. What it looks like it is doing is loading the "/ansible" directory (which is the default) and then you should be mounting your "playbook-resources" into that.
Does this happen on all tasks or just one?
usage docker run --rm -it -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v $(pwd):/ansible willhallonline/ansible:latest ansible-playbook -i ...
OK, so if you are using:
docker run --rm -it
-v ~/.ssh/id_rsa:/root/.ssh/id_rsa
-v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub
-v $(pwd):/ansible
willhallonline/ansible:latest
ansible-playbook -i
This should work. I guess that I don't really know where {{ playbook_dir }}
is being used, however, I would expect that it is operating either without the directory being mounted, or it is looking somewhere else for it.
The directory exists, how can we obtain it? It is possible to use ansible natively on a Linux server, but it cannot be obtained using this Docker version of ansible