-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker issue modifying /etc/hosts inside container #959
Comments
I set a specific property to I don't know if there is a better way, but works for me. |
Also, since we are using Ansible's docker_container module, looks like there is a |
Hi. I'm running into some kind of similar trouble. I can't use etc_hosts in create.yml, cause at this point, I don't know the hosts IP yet. The IP is one of the hosts being created by create.yml. So I need to use hostvars['this.other.host'], but this is obviously only available after the container has been started. Any ideas are highly appreciated :) |
This answered it for me in case google brings anyone else here - docker doesn't let you modify /etc/hosts in a container: William-Yeh/docker-ansible#4 (comment) |
Issue Type
Question
Molecule and Ansible details
ansible --version
2.3.2.0
molecule --version
2.0.4
Molecule installation method: pip
Ansible installation method: One of source, pip, OS package
Desired Behaviour
copy the template to /etc/hosts
template:
src: etc_samba_smb.conf.j2
dest: /etc/hosts
Actual Behaviour (Bug report only)
"msg": "Unable to rename file: /root/.ansible/tmp/ansible-tmp-1505841555.17-211086331282294/source to /etc/hosts: [Errno 16] Device or resource busy"
after doing some search i got to know that this is limitation with dockers. can you please advise if you have any work around for this ?
Please give some details of what is actually happening.
Include a minimum complete verifiable example with
output of running
molecule --debug
.The text was updated successfully, but these errors were encountered: