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

Registration happens before hostname is set #136

Open
mohd-akram opened this issue Dec 30, 2021 · 2 comments
Open

Registration happens before hostname is set #136

mohd-akram opened this issue Dec 30, 2021 · 2 comments

Comments

@mohd-akram
Copy link

This causes VMs to all be registered with the same default box hostname.

@kayari75
Copy link

Same problem for me.

@eusebium
Copy link

Used this workaround

            def vagrant_registration(name, config)
                if Vagrant.has_plugin?("vagrant-registration")
                    # https://github.com/projectatomic/adb-vagrant-registration
                    config.registration.username = ENV['VAGRANT_RHEL_SUBSCRIPTION_USERNAME']
                    config.registration.password = ENV['VAGRANT_RHEL_SUBSCRIPTION_PASSWORD']
                    config.registration.skip = param(p, :skip_subscription)
                    config.registration.name = name
                    # config.registration.unregister_on_halt = false
                end
            end

            # Set VM parameters
            node.vm.provider 'virtualbox' do |vb|

                puts node.vm.hostname
                vagrant_registration(node.vm.hostname, config)

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

3 participants