You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i run provision multiple times, the hostfile seems to be populated with multiple sets of host definitions. Not sure why the filter doesn't work as intended.
if Vagrant.has_plugin?("vagrant-hosts-provisioner")
config.vm.provision :hostsupdate, run: 'always' do |host|
# Get list of all directories in folder above this file.
paths = Dir.entries(projects_dir).select {|entry| File.directory? File.join(projects_dir,entry) and !(entry.start_with?(".")) }
hosts = paths.map do |path|
"#{path}." + config.vm.hostname
end
hosts.push("testing." + config.vm.hostname)
host.hostname = config.vm.hostname
host.manage_guest = true
host.manage_host = true
host.aliases = hosts
host.files = [
'provision/configuration/hosts.json'
]
end
end
Hi,
When i run provision multiple times, the hostfile seems to be populated with multiple sets of host definitions. Not sure why the filter doesn't work as intended.
Hostfile:
The text was updated successfully, but these errors were encountered: