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

Use Vagrant to set the VM hostname #248

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Use Vagrant to set the VM hostname

This has the benefit that Salt will automatically pick up on the
hostname and use it as the minion id, removing the need to manually
pass the minion ID in the Vagrantfile and when debugging inside the VM.
  • Loading branch information
aneeshusa committed Aug 9, 2016
commit b4e43a035a08fe1c0dfa2283f9ef1973ab0d08ad
@@ -7,7 +7,7 @@ def extract_id(env)
id[0]
end

Vagrant.require_version '>= 1.8.0'
Vagrant.require_version '>= 1.8.5'

Vagrant.configure(2) do |config|

@@ -48,13 +48,12 @@ Vagrant.configure(2) do |config|
end
machine.vm.synced_folder dir, state_root
machine.vm.synced_folder File.join(dir, '.travis', 'test_pillars'), pillar_root
machine.vm.hostname = node[:id]
machine.vm.provision :salt do |salt|
salt.bootstrap_script = File.join(dir, '.travis', 'install_salt.sh')
salt.install_args = node[:os] # Pass OS type to bootstrap script
salt.masterless = true
salt.minion_config = minion_config_path
# hack to provide additional options to salt-call
salt.minion_id = node[:id] + ' --retcode-passthrough'
salt.run_highstate = true
salt.verbose = true
salt.log_level = 'info'
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.