Skip to content
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 driver doesn't support etc_hosts from docker_container module #1878

Closed
TomaszKlosinski opened this issue Mar 26, 2019 · 2 comments
Closed
Labels

Comments

@TomaszKlosinski
Copy link

Issue Type

  • Bug report

Molecule and Ansible details

$ ansible --version && molecule --version
ansible 2.7.8
  config file = None
  configured module search path = [u'/Users/tomasz/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/tomasz/Library/Python/2.7/lib/python/site-packages/ansible
  executable location = /Users/tomasz/Library/Python/2.7/bin/ansible
  python version = 2.7.15 (default, Feb 12 2019, 12:27:02) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)]
molecule, version 2.20.0

Molecule installation method (one of):

  • pip

Ansible installation method (one of):

  • pip

Detail any linters or test runners used:

  • No linters or tests, the problem is on create.yml phase.

Desired Behavior

I'm trying to overwrite some domain with etc_hosts from docker_container module:

platforms:
  - name: instance1
    image: ubuntu:16.04
    groups:
      - haproxy-group
    etc_hosts:
      - "prometheus.local": "{{ ansible_default_ipv4.address }}"

There should be new entry in /etc/hosts:

172.17.0.3    prometheus.local

Actual Behaviour

There's no entry in /etc/hosts:

root@instance1:/# cat /etc/hosts
127.0.0.1    localhost
::1    localhost ip6-localhost ip6-loopback
fe00::0    ip6-localnet
ff00::0    ip6-mcastprefix
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters
172.17.0.3    instance1
@decentral1se
Copy link
Contributor

Yep, we're missing that option.

@decentral1se
Copy link
Contributor

                'etc_hosts': {
                    'type': ['string', 'dict'],
                    'keysrules': {'type': 'string'},
                },

Does now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants