作为配置VM的一部分,我需要在配置时创建一个配置文件。在我的主机上,我能够将变量传递给一个erb文件:
erb x=1 y=2 some_conf.erb是否可以在主机上呈现erb文件,然后通过管道将结果发送给客户机?
如果我将erb命令放在config.vm.provision "shell"中,该命令将在来宾计算机(没有Ruby)上运行,例如
# this command runs on the guest
# where as I want erb to run on the host
config.vm.provision "shell", inline: <<-SHELL
erb x=1 y=2 some_conf.erb > /etc/some_conf
SHELLhttps://stackoverflow.com/questions/38387818
复制相似问题