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

floating_ip is not giving me the ip of the remote server server #338

Open
josrom opened this issue Jun 8, 2017 · 2 comments
Open

floating_ip is not giving me the ip of the remote server server #338

josrom opened this issue Jun 8, 2017 · 2 comments

Comments

@josrom
Copy link

josrom commented Jun 8, 2017

Hej, Im trying to retrieve the floating_ip on the vagrant file code to do some things with it but unfortunately seems to be behaving a little bit weird.... i get an object not an string.

g.vm.provision "ansible" do |ansible|
  #ansible.verbose = "vvvv"
  ansible.limit="all"
  ansible.playbook = "grafana.yml"
  config.vm.provider "openstack" do |cc|
    ansible.groups = {
        "grafana" => ["grafana"],
        "grafana:vars" => {"variable1" => "#{cc.floating_ip}"}
    }
  end

end


. The floating IP address from the IP pool which will be assigned to the instance..

@return [String]
attr_accessor :floating_ip

And I get this:
.vagrant/provisioners/ansible/inventory$ cat vagrant_ansible_inventory
Generated by Vagrant

grafana ansible_ssh_host=185.62.207.59 ansible_ssh_port=22 ansible_ssh_user='ubuntu' ansible_ssh_private_key_file='.vagrant/machines/grafana/openstack/vagrant-generated-clxh3ah7'

[grafana]
grafana

[grafana:vars]
variable1=#Object:0x00000003250c80

NOTE: variable1=#Object:0x00000003250c80 as result for "grafana:vars" => {"variable1" => "#{cc.floating_ip}"}

@matttrach
Copy link

This would be a really great variable to pass to provisioning, when using floating IP addresses the server tends not to know it's own IP address. If we could pass this along in an environment variable that would be cool too.

@ghost
Copy link

ghost commented Nov 29, 2019

vagrant-openstack-provider is unusable with multiple vms:

  • there is no way to fix ip;
  • there is no way to setup dns;
  • there is no way to provides vm ips (floating or not) to provisionners.

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

No branches or pull requests

2 participants