ansible-role-hosts
ansible-role-hosts copied to clipboard
Unable to make X into to /my_hosts_file. failed final rename. Resource busy.
Hi, I'm using the latest version of this project.
I downloaded it and changed the location of the hosts file, because I'm running ansible in docker, and mounting my host's /etc/hosts
-> /my_hosts_file
in the container, with the one-line change to make it in vars/main.yml
.
This is the error that I get:
fatal: [localhost]: FAILED! => {"changed": false, "checksum": "6ee6669db6fdc9aebbfea1ff6919ae2ab707ed38", "msg": "Unable to make b'/root/.ansible/tmp/ansible-tmp-1728935999.9977589-156-270216631052827/.source' into to /my_hosts_file, failed final rename from b'/.ansible_tmp592vn342my_hosts_file': [Errno 16] Resource busy: b'/.ansible_tmp592vn342my_hosts_file' -> b'/my_hosts_file'"}
Is it trying to completely replace the /etc/hosts file instead of writing to it? Maybe that's why it's complaining, because it's mounted and can't physically be replaced, only written to / read from?