devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 148 forks source link

ignore_private_ip = false still uses public ip on AWS #273

Open utdrmac opened 5 years ago

utdrmac commented 5 years ago

Using plugin with AWS provider. Defined a VM as follows:

config.vm.define "pmm", primary: true do |pmm|
        pmm.vm.hostname = "pmm"
        pmm.hostmanager.enabled = true
        pmm.hostmanager.manage_guest = true
        pmm.hostmanager.ignore_private_ip = false
...

Run plugin:

$ vagrant hostmanager
[vagrant-hostmanager:guest] Updating hosts file on the virtual machine pmm...

Contents of /etc/hosts

[root@ip-10-11-59-64 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

## vagrant-hostmanager-start
54.193.77.146   pmm

## vagrant-hostmanager-end

ignore_private_ip = false is set. So why isn't the VMs internal IP being used?