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

Access to obtained floating IP from provisioner phase. #205

Closed
0x1b-xyz opened this issue Jan 21, 2015 · 3 comments · Fixed by #229
Closed

Access to obtained floating IP from provisioner phase. #205

0x1b-xyz opened this issue Jan 21, 2015 · 3 comments · Fixed by #229
Assignees
Labels
Milestone

Comments

@0x1b-xyz
Copy link

We're using the floating_ip_pool array to get the provider to snag an available IP for us. In our environment we don't have hostname/dns support configured so we use the IP grabbed by the provider to access the VM.

While it's easy to snag the IP from vagrant via vagrant ssh-config or one of the provider commands - it doesn't seem possible to get that IP from within my shell provisioner where I need it.

The ability to pass the IPs into the shell provisioner [:args] attribute would be awesome!

@tacoben
Copy link

tacoben commented Jan 21, 2015

yes. This. Exactly This. Yes.

@ggiamarchi ggiamarchi self-assigned this Feb 6, 2015
ggiamarchi added a commit that referenced this issue Feb 6, 2015
ggiamarchi added a commit that referenced this issue Feb 6, 2015
@ggiamarchi ggiamarchi added this to the 0.7 milestone Feb 9, 2015
ggiamarchi added a commit that referenced this issue Apr 10, 2015
ggiamarchi added a commit that referenced this issue May 6, 2015
ggiamarchi added a commit that referenced this issue May 6, 2015
ggiamarchi added a commit that referenced this issue May 6, 2015
@ggiamarchi ggiamarchi modified the milestones: 0.7, 0.8 Aug 9, 2015
ggiamarchi added a commit that referenced this issue Aug 10, 2015
@muzzy82
Copy link

muzzy82 commented Jan 12, 2016

Hi,

Is there a similar method for other provisioners, e.g.: for ansible?

  # Provision with ansible
  config.vm.provision :ansible do |ansible|
     ansible.playbook = "ansible_playbook/site.yml"
     ansible.extra_vars = {
         floating_ip: <floating ip here >
     }
  end

edit:
Never mind! Just figured out that the allocated floating ip is accessible in the generated ansible inventory file under 'ansible_ssh_host' variable.

Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jan 18, 2016
Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jul 31, 2016
@ghost
Copy link

ghost commented Dec 10, 2019

ansible_ssh_host does not work for ansible_local provisionning.

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

Successfully merging a pull request may close this issue.

4 participants