我试着玩木偶。所以我用流浪者启动了两个debian实例。我的Vagrantfile文件看起来像这样
Vagrant.configure("2") do |config|
config.vm.define "puppetagent" do |puppetagent|
puppetagent.vm.box = "puphpet/debian75-x64"
puppetagent.vm.hostname = "puppetagent.example.com"
puppetagent.vm.network "private_network",ip: "192.168.10.21"
end
config.vm.define "puppetmaster" do |puppetmaster|
puppetmaster.vm.box = "puphpet/debian75-x64"
puppetmaster.vm.hostname = "puppetmaster.example.com"
puppetmaster.vm.network "private_network",ip: "192.168.10.22"
end但是,当我对两个实例进行ssh处理并查看/etc/hosts时,文件(都在这两个实例上)如下所示:
# master - instance1
127.0.0.1 localhost
127.0.1.1 puppetmaster.example.com puppetmaster
# agent - instance2
127.0.0.1 localhost
127.0.1.1 puppetagent.example.com puppetagent我对此感到困惑。我确实为两者指定了diff,但是为什么它在hosts文件中显示相同的IP呢?
https://stackoverflow.com/questions/31305200
复制相似问题