ggiamarchi / vagrant-openstack-provider

Use Vagrant to manage OpenStack Cloud instances.
MIT License
247 stars 101 forks source link

Setting the hostname (and fqdn) #288

Closed ianabc closed 8 years ago

ianabc commented 8 years ago

Is there somewhere to set the hostname on created instances. I've tried setting either config.define.hostname or os.server_name. Ultimately, I'd like to set the fqdn to something like 'box1.example.com'. I couldn't find anything about this in the issue queue so I'm guessing I'm doing something wrong, but any help would be appreciated.

  boxes.each do |opts|
    config.vm.define opts[:name] do |box|
      box.vm.hostname = opts[:hostname]
      box.vm.provider "openstack" do |os|
        os.server_name = opts[:hostname]
        os.metadata = {'ansible_host_groups' => 'consul'}
ianabc commented 8 years ago

I found a way to do what was needed in ansible during provisioning